From e530a0bf9f834fe5e09903afea8a2d1c6e95fb1e Mon Sep 17 00:00:00 2001 From: baseballyama Date: Tue, 14 Nov 2023 23:02:47 +0900 Subject: [PATCH 01/27] wip --- explorer-v2/a4.json | 283 + explorer-v2/a5.json | 293 + src/parser/index.ts | 25 +- .../ast/$$slots-scope-output-svelte5.json | 114 + .../parser/ast/$var-scope-output-svelte5.json | 257 + ...within-component-scope-output-svelte5.json | 810 + .../ast/attr01-scope-output-svelte5.json | 822 + .../ast/await01-scope-output-svelte5.json | 884 + .../ast/await02-scope-output-svelte5.json | 944 + .../ast/await03-scope-output-svelte5.json | 596 + .../ast/await04-scope-output-svelte5.json | 543 + ...rite-less-code01-scope-output-svelte5.json | 880 + ...lass-directive01-scope-output-svelte5.json | 560 + .../ast/comments01-scope-output-svelte5.json | 34 + .../components01-scope-output-svelte5.json | 199 + .../components02-scope-output-svelte5.json | 199 + .../components03-scope-output-svelte5.json | 270 + .../components04-scope-output-svelte5.json | 199 + ...n-with-expr-like-scope-output-svelte5.json | 603 + ...ve-use-with-expr-scope-output-svelte5.json | 813 + .../01-scope-output-svelte5.json | 34 + .../02-scope-output-svelte5.json | 311 + .../03-scope-output-svelte5.json | 550 + .../04-scope-output-svelte5.json | 1584 ++ .../05-scope-output-svelte5.json | 240 + .../06-scope-output-svelte5.json | 240 + .../01-scope-output-svelte5.json | 688 + .../01-scope-output-svelte5.json | 625 + .../02-scope-output-svelte5.json | 1687 ++ .../03-scope-output-svelte5.json | 835 + .../01-scope-output-svelte5.json | 1166 + .../01-scope-output-svelte5.json | 856 + .../03-style/01-scope-output-svelte5.json | 34 + .../03-style/02-scope-output-svelte5.json | 34 + .../03-style/03-scope-output-svelte5.json | 34 + .../03-style/04-scope-output-svelte5.json | 34 + .../01-tags/01-scope-output-svelte5.json | 199 + .../01-scope-output-svelte5.json | 34 + .../02-scope-output-svelte5.json | 34 + .../03-scope-output-svelte5.json | 175 + .../04-scope-output-svelte5.json | 106 + .../05-scope-output-svelte5.json | 34 + .../06-scope-output-svelte5.json | 106 + .../07-scope-output-svelte5.json | 175 + .../08-scope-output-svelte5.json | 175 + .../09-scope-output-svelte5.json | 175 + .../10-scope-output-svelte5.json | 176 + .../11-scope-output-svelte5.json | 106 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 382 + .../04-comments/01-scope-output-svelte5.json | 34 + .../04-comments/02-scope-output-svelte5.json | 106 + .../05-hash-if/01-scope-output-svelte5.json | 349 + .../05-hash-if/02-scope-output-svelte5.json | 114 + .../05-hash-if/03-scope-output-svelte5.json | 197 + .../06-hash-each/01-scope-output-svelte5.json | 1635 ++ .../06-hash-each/02-scope-output-svelte5.json | 620 + .../06-hash-each/03-scope-output-svelte5.json | 1260 + .../06-hash-each/04-scope-output-svelte5.json | 2164 ++ .../06-hash-each/05-scope-output-svelte5.json | 5270 ++++ .../06-hash-each/06-scope-output-svelte5.json | 567 + .../01-scope-output-svelte5.json | 883 + .../02-scope-output-svelte5.json | 901 + .../03-scope-output-svelte5.json | 489 + .../04-scope-output-svelte5.json | 446 + .../05-scope-output-svelte5.json | 446 + .../08-hash-key/01-scope-output-svelte5.json | 114 + .../08-hash-key/02-scope-output-svelte5.json | 300 + .../08-hash-key/03-scope-output-svelte5.json | 208 + .../09-at-html/01-scope-output-svelte5.json | 106 + .../09-at-html/02-scope-output-svelte5.json | 175 + .../10-at-debug/01-scope-output-svelte5.json | 313 + .../10-at-debug/02-scope-output-svelte5.json | 494 + .../10-at-debug/03-scope-output-svelte5.json | 313 + .../01-scope-output-svelte5.json | 288 + .../02-scope-output-svelte5.json | 1463 ++ .../01-scope-output-svelte5.json | 175 + .../02-scope-output-svelte5.json | 908 + .../03-scope-output-svelte5.json | 208 + .../04-scope-output-svelte5.json | 106 + .../05-scope-output-svelte5.json | 34 + .../06-scope-output-svelte5.json | 1435 ++ .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 244 + .../03-scope-output-svelte5.json | 175 + .../04-scope-output-svelte5.json | 175 + .../05-scope-output-svelte5.json | 106 + .../06-scope-output-svelte5.json | 313 + .../07-scope-output-svelte5.json | 106 + .../08-scope-output-svelte5.json | 106 + .../09-scope-output-svelte5.json | 106 + .../10-scope-output-svelte5.json | 1003 + .../11-scope-output-svelte5.json | 382 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 959 + .../04-bind-this/01-scope-output-svelte5.json | 106 + .../04-bind-this/02-scope-output-svelte5.json | 943 + .../01-scope-output-svelte5.json | 175 + .../02-scope-output-svelte5.json | 451 + .../01-scope-output-svelte5.json | 175 + .../02-scope-output-svelte5.json | 313 + .../02.1-scope-output-svelte5.json | 34 + .../03-scope-output-svelte5.json | 34 + .../01-scope-output-svelte5.json | 1420 + .../02-scope-output-svelte5.json | 625 + .../03-scope-output-svelte5.json | 1536 ++ .../01-scope-output-svelte5.json | 2926 +++ .../02-scope-output-svelte5.json | 208 + .../03-scope-output-svelte5.json | 208 + .../04-scope-output-svelte5.json | 5147 ++++ .../05-scope-output-svelte5.json | 8801 +++++++ .../05-ts-scope-output-svelte5.json | 10560 ++++++++ .../06-scope-output-svelte5.json | 705 + .../07-scope-output-svelte5.json | 448 + .../01-scope-output-svelte5.json | 865 + .../02-scope-output-svelte5.json | 300 + .../01-scope-output-svelte5.json | 4530 ++++ .../02-scope-output-svelte5.json | 980 + .../03-scope-output-svelte5.json | 1132 + .../04-scope-output-svelte5.json | 12283 +++++++++ .../05-scope-output-svelte5.json | 12300 +++++++++ .../01-scope-output-svelte5.json | 175 + .../02-scope-output-svelte5.json | 175 + .../03-scope-output-svelte5.json | 106 + .../01-scope-output-svelte5.json | 175 + .../02-scope-output-svelte5.json | 175 + .../03-scope-output-svelte5.json | 106 + .../01-scope-output-svelte5.json | 175 + .../02-scope-output-svelte5.json | 175 + .../04-bind-this/01-scope-output-svelte5.json | 175 + .../04-bind-this/02-scope-output-svelte5.json | 277 + .../13-slot/00/01-scope-output-svelte5.json | 106 + .../13-slot/00/02-scope-output-svelte5.json | 175 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 175 + .../02-$$slots/01-scope-output-svelte5.json | 184 + .../01-scope-output-svelte5.json | 1299 + .../02-scope-output-svelte5.json | 1203 + .../01-scope-output-svelte5.json | 497 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 175 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 502 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 106 + .../03-scope-output-svelte5.json | 907 + .../04-scope-output-svelte5.json | 106 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 175 + .../01-scope-output-svelte5.json | 106 + .../02-scope-output-svelte5.json | 175 + .../01-scope-output-svelte5.json | 34 + .../02-scope-output-svelte5.json | 34 + .../01-scope-output-svelte5.json | 106 + .../02-old-scope-output-svelte5.json | 34 + .../02-scope-output-svelte5.json | 34 + .../01-scope-output-svelte5.json | 106 + ...ach-with-comment-scope-output-svelte5.json | 636 + ...empty-elements01-scope-output-svelte5.json | 34 + .../hello-world01-scope-output-svelte5.json | 298 + .../hello-world02-scope-output-svelte5.json | 199 + .../hello-world03-scope-output-svelte5.json | 34 + .../hello-world04-scope-output-svelte5.json | 773 + .../hello-world05-scope-output-svelte5.json | 3264 +++ .../html-comments01-scope-output-svelte5.json | 298 + .../ast/i18n-test-scope-output-svelte5.json | 218 + .../ast/if-block01-scope-output-svelte5.json | 197 + .../dot-in-bind01-scope-output-svelte5.json | 298 + ....41-empty-bind01-scope-output-svelte5.json | 298 + ...nt-plugin-svelte-scope-output-svelte5.json | 3176 +++ ...nt-plugin-svelte-scope-output-svelte5.json | 494 + ...nt-plugin-svelte-scope-output-svelte5.json | 1853 ++ .../kit-demo-home-scope-output-svelte5.json | 381 + .../ast/label01-scope-output-svelte5.json | 1492 ++ .../let-directive01-scope-output-svelte5.json | 2848 ++ .../let-directive02-scope-output-svelte5.json | 709 + .../let-directive03-scope-output-svelte5.json | 2325 ++ .../let-directive04-scope-output-svelte5.json | 815 + ...che-with-comment-scope-output-svelte5.json | 106 + ...ing-script-tag01-scope-output-svelte5.json | 34 + .../ast/props01-scope-output-svelte5.json | 258 + .../ast/props02-scope-output-svelte5.json | 159 + .../ast/props03-scope-output-svelte5.json | 240 + .../ast/props04-scope-output-svelte5.json | 240 + .../pug/each/each01-scope-output-svelte5.json | 488 + ...closing-template-scope-output-svelte5.json | 106 + ...th-destructure01-scope-output-svelte5.json | 636 + ...th-destructure02-scope-output-svelte5.json | 752 + ...th-destructure03-scope-output-svelte5.json | 674 + ...th-destructure04-scope-output-svelte5.json | 575 + ...th-destructure05-scope-output-svelte5.json | 611 + ...ive-with-store01-scope-output-svelte5.json | 1077 + ...ive-with-store02-scope-output-svelte5.json | 961 + ...ctive-with-var01-scope-output-svelte5.json | 2370 ++ ...ctive-with-var02-scope-output-svelte5.json | 1476 ++ ...ctive-with-var03-scope-output-svelte5.json | 330 + ...ve-with-var04-ts-scope-output-svelte5.json | 602 + .../parser/ast/sass-scope-output-svelte5.json | 34 + .../script-in-style-scope-output-svelte5.json | 34 + .../ast/script-tag-scope-output-svelte5.json | 34 + ...-closing-style01-scope-output-svelte5.json | 34 + .../store-bindings-scope-output-svelte5.json | 568 + ...tyle-directive01-scope-output-svelte5.json | 34 + ...tyle-directive02-scope-output-svelte5.json | 313 + ...tyle-directive03-scope-output-svelte5.json | 298 + .../style-global01-scope-output-svelte5.json | 34 + .../style-global02-scope-output-svelte5.json | 34 + .../style-in-script-scope-output-svelte5.json | 544 + .../ast/style01-scope-output-svelte5.json | 34 + .../ast/style02-scope-output-svelte5.json | 34 + ...t-with-bind-this-scope-output-svelte5.json | 613 + ...rly-spacing-test-scope-output-svelte5.json | 297 + .../ast/this-attr01-scope-output-svelte5.json | 1144 + .../ast/this-attr02-scope-output-svelte5.json | 1144 + .../ast/this-attr03-scope-output-svelte5.json | 1144 + .../ast/this-attr04-scope-output-svelte5.json | 34 + .../ast/this-attr05-scope-output-svelte5.json | 34 + ...ailing-comment01-scope-output-svelte5.json | 484 + .../ts-$$props01-scope-output-svelte5.json | 176 + .../ts-$$slots01-scope-output-svelte5.json | 106 + ...$slots02-no-slot-scope-output-svelte5.json | 106 + ...-$$slots03-named-scope-output-svelte5.json | 106 + ...-$$slots04-named-scope-output-svelte5.json | 106 + ...it-non-promise01-scope-output-svelte5.json | 1495 ++ .../ast/ts-each01-scope-output-svelte5.json | 3807 +++ .../ast/ts-event01-scope-output-svelte5.json | 428 + .../ast/ts-event02-scope-output-svelte5.json | 428 + .../ast/ts-event03-scope-output-svelte5.json | 1215 + .../ast/ts-event04-scope-output-svelte5.json | 304 + .../ast/ts-event05-scope-output-svelte5.json | 469 + .../ast/ts-event06-scope-output-svelte5.json | 469 + .../ast/ts-issue226-scope-output-svelte5.json | 4947 ++++ .../ts-let/ts-let01-scope-output-svelte5.json | 3439 +++ .../ast/ts-newline-scope-output-svelte5.json | 1151 + ...s-not-reactive01-scope-output-svelte5.json | 1816 ++ .../ts-promise01-scope-output-svelte5.json | 3121 +++ .../ts-promise02-scope-output-svelte5.json | 6704 +++++ .../ts-reactive01-scope-output-svelte5.json | 1336 + .../ts-reactive02-scope-output-svelte5.json | 2358 ++ .../ts-reactive03-scope-output-svelte5.json | 1128 + .../ts-reactive04-scope-output-svelte5.json | 1082 + .../ts-reactive05-scope-output-svelte5.json | 1742 ++ .../ts-reactive06-scope-output-svelte5.json | 4918 ++++ ...ts-scope-issue01-scope-output-svelte5.json | 1362 + ...shorthand-attr01-scope-output-svelte5.json | 378 + .../ast/ts-store01-scope-output-svelte5.json | 2344 ++ .../ast/ts-store02-scope-output-svelte5.json | 1406 + .../ast/ts-store03-scope-output-svelte5.json | 5180 ++++ .../ast/ts-use01-scope-output-svelte5.json | 3910 +++ .../actions-scope-output-svelte5.json | 5922 +++++ .../adding-data-scope-output-svelte5.json | 298 + ...eters-to-actions-scope-output-svelte5.json | 1289 + ...s-to-transitions-scope-output-svelte5.json | 609 + .../animate-scope-output-svelte5.json | 21445 ++++++++++++++++ ...-subscriptions01-scope-output-svelte5.json | 1890 ++ .../await-blocks-scope-output-svelte5.json | 5217 ++++ .../tutorial/basics-scope-output-svelte5.json | 34 + .../bind-this-scope-output-svelte5.json | 14671 +++++++++++ .../checkbox-inputs-scope-output-svelte5.json | 473 + .../class-shorthand-scope-output-svelte5.json | 458 + .../classes-scope-output-svelte5.json | 846 + ...onent-bindings01-scope-output-svelte5.json | 1533 ++ ...onent-bindings02-scope-output-svelte5.json | 3244 +++ ...mponent-events01-scope-output-svelte5.json | 1014 + ...mponent-events02-scope-output-svelte5.json | 891 + .../congratulations-scope-output-svelte5.json | 8849 +++++++ ...ditable-bindings-scope-output-svelte5.json | 378 + .../context-api01-scope-output-svelte5.json | 762 + .../context-api02-scope-output-svelte5.json | 3669 +++ .../context-api03-scope-output-svelte5.json | 2875 +++ ...ss-transitions01-scope-output-svelte5.json | 6697 +++++ ...ss-transitions02-scope-output-svelte5.json | 6590 +++++ ...m-js-transitions-scope-output-svelte5.json | 8622 +++++++ .../custom-stores-scope-output-svelte5.json | 457 + .../debug01-scope-output-svelte5.json | 654 + .../debug02-scope-output-svelte5.json | 725 + ...eclaring-props01-scope-output-svelte5.json | 199 + ...eclaring-props02-scope-output-svelte5.json | 240 + ...default-values01-scope-output-svelte5.json | 199 + ...default-values02-scope-output-svelte5.json | 338 + ...rred-transitions-scope-output-svelte5.json | 20918 +++++++++++++++ .../derived-stores-scope-output-svelte5.json | 1176 + .../dimensions-scope-output-svelte5.json | 1208 + ...ent-forwarding01-scope-output-svelte5.json | 570 + ...ent-forwarding02-scope-output-svelte5.json | 34 + .../dom-events-scope-output-svelte5.json | 1821 ++ ...namic-attributes-scope-output-svelte5.json | 458 + ...h-block-bindings-scope-output-svelte5.json | 4152 +++ .../each-blocks01-scope-output-svelte5.json | 1422 + .../each-blocks02-scope-output-svelte5.json | 2267 ++ .../else-blocks-scope-output-svelte5.json | 1141 + ...else-if-blocks01-scope-output-svelte5.json | 896 + ...else-if-blocks02-scope-output-svelte5.json | 766 + ...ent-forwarding01-scope-output-svelte5.json | 1014 + ...ent-forwarding02-scope-output-svelte5.json | 891 + ...ent-forwarding03-scope-output-svelte5.json | 1385 + ...ent-forwarding04-scope-output-svelte5.json | 199 + .../event-modifiers-scope-output-svelte5.json | 407 + .../group-inputs-scope-output-svelte5.json | 4456 ++++ .../html-tags01-scope-output-svelte5.json | 321 + .../html-tags02-scope-output-svelte5.json | 321 + .../if-blocks-scope-output-svelte5.json | 1221 + .../in-and-out-scope-output-svelte5.json | 830 + .../inline-handlers-scope-output-svelte5.json | 2362 ++ ...eyed-each-blocks-scope-output-svelte5.json | 2265 ++ ...ocal-transitions-scope-output-svelte5.json | 2020 ++ .../media-elements-scope-output-svelte5.json | 13446 ++++++++++ ...module-exports01-scope-output-svelte5.json | 700 + ...module-exports02-scope-output-svelte5.json | 4401 ++++ ...-select-bindings-scope-output-svelte5.json | 4211 +++ .../named-slots01-scope-output-svelte5.json | 199 + .../named-slots02-scope-output-svelte5.json | 34 + ...ted-components01-scope-output-svelte5.json | 199 + ...ted-components02-scope-output-svelte5.json | 34 + ...numeric-inputs01-scope-output-svelte5.json | 1040 + ...numeric-inputs02-scope-output-svelte5.json | 1040 + .../ondestroy-scope-output-svelte5.json | 1278 + .../onmount-scope-output-svelte5.json | 2107 ++ ...optional-slots01-scope-output-svelte5.json | 513 + ...optional-slots02-scope-output-svelte5.json | 990 + ...optional-slots03-scope-output-svelte5.json | 992 + ...tive-assignments-scope-output-svelte5.json | 773 + ...ive-declarations-scope-output-svelte5.json | 1192 + ...ctive-statements-scope-output-svelte5.json | 1658 ++ .../readable-stores-scope-output-svelte5.json | 875 + .../select-bindings-scope-output-svelte5.json | 3049 +++ .../sharing-code01-scope-output-svelte5.json | 519 + .../sharing-code02-scope-output-svelte5.json | 2635 ++ ...slot-fallbacks01-scope-output-svelte5.json | 279 + ...slot-fallbacks02-scope-output-svelte5.json | 34 + .../slot-props01-scope-output-svelte5.json | 1041 + .../slot-props02-scope-output-svelte5.json | 989 + .../slot-props03-scope-output-svelte5.json | 1041 + .../slots01-scope-output-svelte5.json | 199 + .../slots02-scope-output-svelte5.json | 34 + .../spread-props01-scope-output-svelte5.json | 933 + .../spread-props02-scope-output-svelte5.json | 932 + .../spread-props03-scope-output-svelte5.json | 693 + .../tutorial/spring-scope-output-svelte5.json | 2508 ++ .../styling01-scope-output-svelte5.json | 34 + .../styling02-scope-output-svelte5.json | 34 + .../svelte-body-scope-output-svelte5.json | 1197 + ...svelte-component-scope-output-svelte5.json | 2146 ++ .../svelte-document-scope-output-svelte5.json | 1115 + .../svelte-element-scope-output-svelte5.json | 1355 + .../svelte-fragment-scope-output-svelte5.json | 199 + .../svelte-head-scope-output-svelte5.json | 34 + ...svelte-options01-scope-output-svelte5.json | 4850 ++++ ...svelte-options02-scope-output-svelte5.json | 998 + ...svelte-options03-scope-output-svelte5.json | 998 + .../svelte-self01-scope-output-svelte5.json | 2448 ++ .../svelte-self02-scope-output-svelte5.json | 810 + .../svelte-self03-scope-output-svelte5.json | 2575 ++ ...-window-bindings-scope-output-svelte5.json | 1996 ++ .../svelte-window-scope-output-svelte5.json | 1839 ++ .../text-inputs01-scope-output-svelte5.json | 378 + .../text-inputs02-scope-output-svelte5.json | 378 + .../textarea-inputs-scope-output-svelte5.json | 564 + .../tutorial/tick-scope-output-svelte5.json | 7053 +++++ ...ransition-events-scope-output-svelte5.json | 1548 ++ .../transition-scope-output-svelte5.json | 609 + .../tweened-scope-output-svelte5.json | 1478 ++ .../tutorial/update-scope-output-svelte5.json | 11188 ++++++++ ...rays-and-objects-scope-output-svelte5.json | 2294 ++ ...ritable-stores01-scope-output-svelte5.json | 1629 ++ ...ritable-stores02-scope-output-svelte5.json | 882 + ...ritable-stores03-scope-output-svelte5.json | 882 + ...ritable-stores04-scope-output-svelte5.json | 571 + ...nown-directive01-scope-output-svelte5.json | 480 + ...write-only-store-scope-output-svelte5.json | 1288 + tests/src/parser/parser.ts | 39 +- tests/src/parser/test-utils.ts | 17 +- 372 files changed, 478795 insertions(+), 42 deletions(-) create mode 100644 explorer-v2/a4.json create mode 100644 explorer-v2/a5.json create mode 100644 tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/$var-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/attr01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/await01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/await02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/await03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/await04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/comments01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/components01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/components02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/components03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/components04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/label01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/props01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/props02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/props03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/props04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/sass-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/style02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json diff --git a/explorer-v2/a4.json b/explorer-v2/a4.json new file mode 100644 index 00000000..072d0c1c --- /dev/null +++ b/explorer-v2/a4.json @@ -0,0 +1,283 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:element" + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "class" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "foo" + } + ] + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "this" + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "input" + } + ] + }, + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "type" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "number" + } + ] + } + ], + "selfClosing": true + }, + "children": [], + "endTag": null + }, + { + "type": "SvelteText", + "value": "\n" + }, + { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:element" + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "class" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "foo" + } + ] + }, + { + "type": "SvelteSpecialDirective", + "kind": "this", + "key": { + "type": "SvelteSpecialDirectiveKey" + }, + "expression": { + "type": "Literal", + "value": "input", + "raw": "\"input\"" + } + }, + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "type" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "number" + } + ] + } + ], + "selfClosing": true + }, + "children": [], + "endTag": null + } + ], + "comments": [], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "<" + }, + { + "type": "HTMLIdentifier", + "value": "svelte:element" + }, + { + "type": "HTMLIdentifier", + "value": "class" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "foo" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLIdentifier", + "value": "this" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "input" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLIdentifier", + "value": "type" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "number" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "Punctuator", + "value": "/" + }, + { + "type": "Punctuator", + "value": ">" + }, + { + "type": "HTMLText", + "value": "\n" + }, + { + "type": "Punctuator", + "value": "<" + }, + { + "type": "HTMLIdentifier", + "value": "svelte:element" + }, + { + "type": "HTMLIdentifier", + "value": "class" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "foo" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLIdentifier", + "value": "this" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "{" + }, + { + "type": "String", + "value": "\"input\"" + }, + { + "type": "Punctuator", + "value": "}" + }, + { + "type": "HTMLIdentifier", + "value": "type" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "number" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "Punctuator", + "value": "/" + }, + { + "type": "Punctuator", + "value": ">" + } + ] +} diff --git a/explorer-v2/a5.json b/explorer-v2/a5.json new file mode 100644 index 00000000..59ac5b12 --- /dev/null +++ b/explorer-v2/a5.json @@ -0,0 +1,293 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:element" + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "class" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "foo" + } + ] + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "this" + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "input" + } + ] + }, + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "type" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "number" + } + ] + } + ], + "selfClosing": true + }, + "children": [], + "endTag": null + }, + { + "type": "SvelteText", + "value": "\n" + }, + { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:element" + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "class" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "foo" + } + ] + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "this" + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "input" + } + ] + }, + { + "type": "SvelteAttribute", + "boolean": false, + "key": { + "type": "SvelteName", + "name": "type" + }, + "value": [ + { + "type": "SvelteLiteral", + "value": "number" + } + ] + } + ], + "selfClosing": true + }, + "children": [], + "endTag": null + } + ], + "comments": [], + "sourceType": "module", + "tokens": [ + { + "type": "Punctuator", + "value": "<" + }, + { + "type": "HTMLIdentifier", + "value": "svelte:element" + }, + { + "type": "HTMLIdentifier", + "value": "class" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "foo" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLIdentifier", + "value": "this" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "input" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLIdentifier", + "value": "type" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "number" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "Punctuator", + "value": "/" + }, + { + "type": "Punctuator", + "value": ">" + }, + { + "type": "HTMLText", + "value": "\n" + }, + { + "type": "Punctuator", + "value": "<" + }, + { + "type": "HTMLIdentifier", + "value": "svelte:element" + }, + { + "type": "HTMLIdentifier", + "value": "class" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "foo" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLIdentifier", + "value": "this" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "{" + }, + { + "type": "HTMLText", + "value": "\"inpu" + }, + { + "type": "Punctuator", + "value": "t" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "Punctuator", + "value": "}" + }, + { + "type": "HTMLIdentifier", + "value": "type" + }, + { + "type": "Punctuator", + "value": "=" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "HTMLText", + "value": "number" + }, + { + "type": "Punctuator", + "value": "\"" + }, + { + "type": "Punctuator", + "value": "/" + }, + { + "type": "Punctuator", + "value": ">" + } + ] +} diff --git a/src/parser/index.ts b/src/parser/index.ts index 28d5abfe..449b9959 100644 --- a/src/parser/index.ts +++ b/src/parser/index.ts @@ -7,6 +7,7 @@ import type { SvelteStyleElement, Token, } from "../ast"; +import { VERSION as SVELTE_VERSION } from "svelte/compiler"; import type { Program } from "estree"; import type { ScopeManager } from "eslint-scope"; import { Variable } from "eslint-scope"; @@ -33,6 +34,10 @@ import { styleNodeRange, } from "./style-context"; +const globalsForSvelte4: Readonly = ["$$slots", "$$props", "$$restProps"]; +const globalsForSvelte5: Readonly = ["$state", "$derived", "$effect", "$effect.pre", "$props"]; +const globals = SVELTE_VERSION.startsWith("5") ? globalsForSvelte5 : globalsForSvelte4; + export { StyleContext, StyleContextNoStyleElement, @@ -101,16 +106,16 @@ export function parseForESLint( const scripts = ctx.sourceCode.scripts; const resultScript = ctx.isTypeScript() ? parseTypeScript( - scripts.getCurrentVirtualCodeInfo(), - scripts.attrs, - parserOptions, - { slots: ctx.slots }, - ) + scripts.getCurrentVirtualCodeInfo(), + scripts.attrs, + parserOptions, + { slots: ctx.slots }, + ) : parseScript( - scripts.getCurrentVirtualCode(), - scripts.attrs, - parserOptions, - ); + scripts.getCurrentVirtualCode(), + scripts.attrs, + parserOptions, + ); ctx.scriptLet.restore(resultScript); ctx.tokens.push(...resultScript.ast.tokens); ctx.comments.push(...resultScript.ast.comments); @@ -122,7 +127,7 @@ export function parseForESLint( analyzeStoreScope(resultScript.scopeManager!); // for reactive vars // Add $$xxx variable - for (const $$name of ["$$slots", "$$props", "$$restProps"]) { + for (const $$name of globals) { const globalScope = resultScript.scopeManager!.globalScope; const variable = new Variable(); variable.name = $$name; diff --git a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json new file mode 100644 index 00000000..8aa15e1c --- /dev/null +++ b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json @@ -0,0 +1,114 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json new file mode 100644 index 00000000..13a91319 --- /dev/null +++ b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json @@ -0,0 +1,257 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "local": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 42, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 42, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json new file mode 100644 index 00000000..160b8416 --- /dev/null +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json @@ -0,0 +1,810 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Component", + "identifiers": [ + { + "type": "Identifier", + "name": "Component", + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Component", + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 80, + 89 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 66, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 80, + 89 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "b", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "range": [ + 101, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json new file mode 100644 index 00000000..4f004ffa --- /dev/null +++ b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json @@ -0,0 +1,822 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ] + }, + { + "name": "c", + "identifiers": [ + { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 41, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json new file mode 100644 index 00000000..b170929d --- /dev/null +++ b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json @@ -0,0 +1,884 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "expression", + "identifiers": [ + { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 13, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 106, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 144, + 154 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 184, + 194 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 106, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 144, + 154 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 184, + 194 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 28 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 28 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 15, + "column": 0 + } + } + } + ], + "range": [ + 136, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 201, + 205 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 201, + 205 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": true, + "error": { + "type": "Identifier", + "name": "name", + "range": [ + 201, + 205 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 18, + "column": 0 + } + } + } + ], + "range": [ + 176, + 207 + ], + "loc": { + "start": { + "line": 17, + "column": 0 + }, + "end": { + "line": 18, + "column": 0 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json new file mode 100644 index 00000000..6704dac2 --- /dev/null +++ b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json @@ -0,0 +1,944 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "expression", + "identifiers": [ + { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 13, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 127, + 137 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 246, + 256 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 127, + 137 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 246, + 256 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "theError", + "identifiers": [ + { + "type": "Identifier", + "name": "theError", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "theError", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "theError", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 193, + 195 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 196, + 197 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 195, + 198 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "oh no! ", + "range": [ + 198, + 205 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "theError", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 215, + 222 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 28 + } + } + }, + "range": [ + 206, + 222 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 28 + } + } + }, + "range": [ + 205, + 223 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 29 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 223, + 227 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + "range": [ + 195, + 227 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 227, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 33 + }, + "end": { + "line": 13, + "column": 0 + } + } + } + ], + "range": [ + 176, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "theError", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "theError", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "theError", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "theError", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/await03-scope-output-svelte5.json b/tests/fixtures/parser/ast/await03-scope-output-svelte5.json new file mode 100644 index 00000000..9f372949 --- /dev/null +++ b/tests/fixtures/parser/ast/await03-scope-output-svelte5.json @@ -0,0 +1,596 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "expression", + "identifiers": [ + { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 13, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 103, + 113 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 139, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 103, + 113 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 139, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expression", + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json new file mode 100644 index 00000000..e57c558c --- /dev/null +++ b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json @@ -0,0 +1,543 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "p", + "identifiers": [ + { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Promise", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "resolve", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 31, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 27, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "v", + "identifiers": [ + { + "type": "Identifier", + "name": "v", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "v", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "v", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json new file mode 100644 index 00000000..c584f6b7 --- /dev/null +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json @@ -0,0 +1,880 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json new file mode 100644 index 00000000..75d70de4 --- /dev/null +++ b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json @@ -0,0 +1,560 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 14, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 94, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 38, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "range": [ + 32, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 94, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json new file mode 100644 index 00000000..17e5e2d9 --- /dev/null +++ b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "MyComponent", + "identifiers": [ + { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 70, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 70, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json new file mode 100644 index 00000000..17e5e2d9 --- /dev/null +++ b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "MyComponent", + "identifiers": [ + { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 70, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 70, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json new file mode 100644 index 00000000..91f06b95 --- /dev/null +++ b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json @@ -0,0 +1,270 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "MyComponents", + "identifiers": [ + { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "node": { + "type": "ImportNamespaceSpecifier", + "local": { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 17, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 70, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 70, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyComponents", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "OtherComponents", + "range": [ + 146, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "OtherComponents", + "range": [ + 146, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "OtherComponents", + "range": [ + 146, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json new file mode 100644 index 00000000..f00b0217 --- /dev/null +++ b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Nested", + "identifiers": [ + { + "type": "Identifier", + "name": "Nested", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Nested", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportNamespaceSpecifier", + "local": { + "type": "Identifier", + "name": "Nested", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 65, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 65, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json new file mode 100644 index 00000000..4547a110 --- /dev/null +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json @@ -0,0 +1,603 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Inner", + "identifiers": [ + { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 102, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'foo.bar'", + "value": "foo.bar", + "range": [ + 77, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 41 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 71, + 87 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 65, + 87 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 42 + } + } + }, + "range": [ + 60, + 87 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 42 + } + } + } + ], + "range": [ + 58, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 44 + } + } + }, + "range": [ + 52, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 44 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 102, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json new file mode 100644 index 00000000..b8a8cfb5 --- /dev/null +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json @@ -0,0 +1,813 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 27, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 57, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 52, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "'Success'", + "value": "Success", + "range": [ + 71, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "range": [ + 52, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "range": [ + 52, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 36 + } + } + } + ], + "range": [ + 42, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "range": [ + 32, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 27, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "range": [ + 21, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "range": [ + 15, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 57, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 52, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "'Success'", + "value": "Success", + "range": [ + 71, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "range": [ + 52, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "range": [ + 52, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 36 + } + } + } + ], + "range": [ + 42, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "range": [ + 32, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json new file mode 100644 index 00000000..8aa93825 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json @@ -0,0 +1,311 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "init": null, + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 111, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 97, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 111, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 97, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 97, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json new file mode 100644 index 00000000..c694e3f0 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json @@ -0,0 +1,550 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "init": { + "type": "Literal", + "raw": "'optional default initial value'", + "value": "optional default initial value", + "range": [ + 27, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 50 + } + } + }, + "range": [ + 21, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "baz", + "identifiers": [ + { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "init": { + "type": "Identifier", + "name": "undefined", + "range": [ + 79, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 73, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 73, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "undefined", + "range": [ + 79, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "undefined", + "range": [ + 79, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "undefined", + "range": [ + 79, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json new file mode 100644 index 00000000..f064f431 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json @@ -0,0 +1,1584 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "thisIs", + "identifiers": [ + { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "init": { + "type": "Literal", + "raw": "'readonly'", + "value": "readonly", + "range": [ + 55, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "range": [ + 46, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ] + }, + { + "name": "greet", + "identifiers": [ + { + "type": "Identifier", + "name": "greet", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "greet", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 116, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "hello ", + "raw": "hello " + }, + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "!", + "raw": "!" + }, + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 24 + } + } + } + ], + "range": [ + 107, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 24 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 101, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 101, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 97, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "greet", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 76, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "format", + "identifiers": [ + { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 36 + }, + "end": { + "line": 10, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "n", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toFixed", + "range": [ + 177, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "range": [ + 175, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 175, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + ], + "range": [ + 170, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "range": [ + 161, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "thisIs", + "range": [ + 46, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 161, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 116, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "hello ", + "raw": "hello " + }, + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "!", + "raw": "!" + }, + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 24 + } + } + } + ], + "range": [ + 107, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 24 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 101, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 101, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 97, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "greet", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 76, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 116, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 116, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "n", + "identifiers": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 36 + }, + "end": { + "line": 10, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "n", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toFixed", + "range": [ + 177, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "range": [ + 175, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 175, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + ], + "range": [ + 170, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json new file mode 100644 index 00000000..abb9fc00 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json @@ -0,0 +1,240 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "className", + "identifiers": [ + { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": null, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "className", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "className", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "className", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json new file mode 100644 index 00000000..abb9fc00 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json @@ -0,0 +1,240 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "className", + "identifiers": [ + { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": null, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "className", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "className", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "className", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "className", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json new file mode 100644 index 00000000..ef8a2d57 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json @@ -0,0 +1,688 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 143, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 143, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 143, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 143, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 20 + } + } + } + ], + "range": [ + 51, + 164 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [], + "range": [ + 27, + 164 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 143, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 143, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json new file mode 100644 index 00000000..2c8006cb --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json @@ -0,0 +1,625 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "title", + "identifiers": [ + { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "init": null, + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 232, + 237 + ], + "loc": { + "start": { + "line": 10, + "column": 38 + }, + "end": { + "line": 10, + "column": 43 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 109, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 142, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 232, + 237 + ], + "loc": { + "start": { + "line": 10, + "column": 38 + }, + "end": { + "line": 10, + "column": 43 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 142, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 232, + 237 + ], + "loc": { + "start": { + "line": 10, + "column": 38 + }, + "end": { + "line": 10, + "column": 43 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 109, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 142, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 109, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 142, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json new file mode 100644 index 00000000..3cdcc951 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json @@ -0,0 +1,1687 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "y", + "identifiers": [ + { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + }, + { + "name": "yPlusAValue", + "identifiers": [ + { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 44, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 44, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "value", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 74, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 67, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 63, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 44, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 35, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 44, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ] + }, + { + "name": "total", + "identifiers": [ + { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 101, + 115 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "range": [ + 93, + 115 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "total", + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 44, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "total", + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "total", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "value", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 74, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 67, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 63, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "yPlusAValue", + "range": [ + 44, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 35, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json new file mode 100644 index 00000000..c8e221c7 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json @@ -0,0 +1,835 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "num", + "identifiers": [ + { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "init": null, + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 126, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "squared", + "identifiers": [ + { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "num", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "num", + "range": [ + 126, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "range": [ + 120, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "range": [ + 110, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "squared", + "range": [ + 143, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + } + ] + }, + { + "name": "cubed", + "identifiers": [ + { + "type": "Identifier", + "name": "cubed", + "range": [ + 135, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "cubed", + "range": [ + 135, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "cubed", + "range": [ + 135, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "squared", + "range": [ + 143, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "num", + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 143, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 135, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 126, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cubed", + "range": [ + 135, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "cubed", + "range": [ + 135, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "squared", + "range": [ + 143, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "squared", + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json new file mode 100644 index 00000000..dfaf5a6f --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json @@ -0,0 +1,1166 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 67, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 67, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 67, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "range": [ + 59, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 93, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 187, + 193 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 187, + 193 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 67, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 81, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 93, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 129, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 175, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 187, + 193 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 81, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 129, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 175, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 81, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 129, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 175, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json new file mode 100644 index 00000000..3ee5c6eb --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json @@ -0,0 +1,856 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "totalComponents", + "identifiers": [ + { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 31, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 193, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 235, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 328, + 343 + ], + "loc": { + "start": { + "line": 13, + "column": 71 + }, + "end": { + "line": 13, + "column": 86 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "name": "alertTotal", + "identifiers": [ + { + "type": "Identifier", + "name": "alertTotal", + "range": [ + 170, + 180 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "alertTotal", + "range": [ + 170, + 180 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 193, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 187, + 209 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 187, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + ], + "range": [ + 183, + 213 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "alertTotal", + "range": [ + 170, + 180 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "params": [], + "range": [ + 161, + 213 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 235, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 258, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 328, + 343 + ], + "loc": { + "start": { + "line": 13, + "column": 71 + }, + "end": { + "line": 13, + "column": 86 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 193, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 193, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalComponents", + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 258, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 187, + 192 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 258, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json new file mode 100644 index 00000000..0f9803a2 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Widget", + "identifiers": [ + { + "type": "Identifier", + "name": "Widget", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Widget", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Widget", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 67, + 73 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Widget", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 67, + 73 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Widget", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json new file mode 100644 index 00000000..77293f06 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json new file mode 100644 index 00000000..5b3e5d75 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "clickable", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clickable", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clickable", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json new file mode 100644 index 00000000..78ba1afa --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json new file mode 100644 index 00000000..6feba977 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "disabled", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "disabled", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "disabled", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "disabled", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "disabled", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "disabled", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json new file mode 100644 index 00000000..977fab12 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 13, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 13, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 13, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json new file mode 100644 index 00000000..73592d5d --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 12, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json new file mode 100644 index 00000000..39dcd8a3 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json @@ -0,0 +1,176 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 12, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 12, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 12, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json new file mode 100644 index 00000000..781f2bad --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 11, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 11, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 11, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json new file mode 100644 index 00000000..73d599b9 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 1, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 1, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 1, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json new file mode 100644 index 00000000..ba08f3d0 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json @@ -0,0 +1,382 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 43, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json new file mode 100644 index 00000000..ee12a1ef --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 57, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 57, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 57, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json new file mode 100644 index 00000000..be8c1387 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json @@ -0,0 +1,349 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 5, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 30, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 79, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 5, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 30, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 79, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 5, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 30, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 79, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json new file mode 100644 index 00000000..6e5bedff --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json @@ -0,0 +1,114 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 5, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 5, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 5, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json new file mode 100644 index 00000000..23b52e16 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json @@ -0,0 +1,197 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "porridge", + "range": [ + 5, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "porridge", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "porridge", + "range": [ + 5, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "porridge", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "porridge", + "range": [ + 5, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "porridge", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json new file mode 100644 index 00000000..4cf23501 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json @@ -0,0 +1,1635 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 44, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 131, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 181, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 25 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 29 + } + } + } + ], + "else": null, + "range": [ + 0, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 36 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 44, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "else": null, + "range": [ + 37, + 80 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + } + ], + "references": [] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 44, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "else": null, + "range": [ + 37, + 80 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "index": null, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "else": null, + "range": [ + 81, + 123 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 42 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 131, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 163, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "else": null, + "range": [ + 124, + 173 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 49 + } + } + } + } + ], + "references": [] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 131, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 151, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 163, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "else": null, + "range": [ + 124, + 173 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 49 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "expression", + "range": [ + 181, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "name", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 200, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 210, + 213 + ], + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 39 + } + } + } + ], + "range": [ + 203, + 213 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "range": [ + 174, + 220 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 46 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 44, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 131, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 181, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 44, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 131, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 181, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json new file mode 100644 index 00000000..199d1d2d --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json @@ -0,0 +1,620 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 54, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 57, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 68, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 72, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "qty", + "range": [ + 77, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "range": [ + 71, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 30 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 81, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 53, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "else": null, + "range": [ + 29, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 72, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 72, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json new file mode 100644 index 00000000..567b593c --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json @@ -0,0 +1,1260 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 27, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 37, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 39, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 50, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "qty", + "range": [ + 59, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 54, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 53, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + "range": [ + 26, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + ], + "else": null, + "range": [ + 0, + 76 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 27, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 30, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 37, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 39, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 50, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "qty", + "range": [ + 59, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 54, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 53, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + "range": [ + 26, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + ], + "else": null, + "range": [ + 0, + 76 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json new file mode 100644 index 00000000..2ff71892 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json @@ -0,0 +1,2164 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "index": null, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 27, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "range": [ + 22, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 34, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 43, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 37, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "qty", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 51, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 33, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + ], + "else": null, + "range": [ + 0, + 74 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 141, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 146, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 141, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 153, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 157, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "range": [ + 156, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 163, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 165, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 176, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "qty", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 180, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 179, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + "range": [ + 152, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 43 + } + } + } + ], + "else": null, + "range": [ + 116, + 202 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 141, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 141, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 146, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 141, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 153, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 157, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "range": [ + 156, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 163, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 165, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 176, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "qty", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 180, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 179, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + "range": [ + 152, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 43 + } + } + } + ], + "else": null, + "range": [ + 116, + 202 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 157, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 141, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 157, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 180, + 184 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json new file mode 100644 index 00000000..fc368aa3 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json @@ -0,0 +1,5270 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "objects", + "range": [ + 93, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "id", + "identifiers": [ + { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + ], + "range": [ + 16, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 45, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 55, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "qty", + "range": [ + 67, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 66, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "range": [ + 44, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "else": null, + "range": [ + 0, + 84 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "id", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ] + }, + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + ], + "range": [ + 16, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 45, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 55, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "qty", + "range": [ + 67, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 66, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "range": [ + 44, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "else": null, + "range": [ + 0, + 84 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + } + ] + }, + { + "name": "qty", + "identifiers": [ + { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + ], + "range": [ + 16, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 45, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 55, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "qty", + "range": [ + 67, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 66, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "range": [ + 44, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "else": null, + "range": [ + 0, + 84 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "qty", + "range": [ + 67, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + ], + "range": [ + 16, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 45, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 48, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 55, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "SvelteText", + "value": " x ", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "qty", + "range": [ + 67, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 66, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "range": [ + 44, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "else": null, + "range": [ + 0, + 84 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "id", + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "id", + "range": [ + 18, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 35 + }, + "end": { + "line": 1, + "column": 36 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "qty", + "range": [ + 67, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "qty", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "id", + "identifiers": [ + { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "objects", + "range": [ + 93, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "context": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "rest", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 31 + } + } + } + ], + "range": [ + 104, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 122, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 127, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 126, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "id", + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 136, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 126, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 144, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteSpreadAttribute", + "argument": { + "type": "Identifier", + "name": "rest", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 39 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 6, + "column": 44 + } + } + } + ], + "selfClosing": true, + "range": [ + 143, + 167 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 143, + 167 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 46 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 46 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "range": [ + 122, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 51 + } + } + } + ], + "else": null, + "range": [ + 86, + 180 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "id", + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + } + ] + }, + { + "name": "rest", + "identifiers": [ + { + "type": "Identifier", + "name": "rest", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "rest", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "objects", + "range": [ + 93, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "context": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "rest", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + "range": [ + 110, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 31 + } + } + } + ], + "range": [ + 104, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 122, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 127, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 126, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "id", + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 136, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 126, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 144, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteSpreadAttribute", + "argument": { + "type": "Identifier", + "name": "rest", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 39 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 6, + "column": 44 + } + } + } + ], + "selfClosing": true, + "range": [ + 143, + 167 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 143, + 167 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 46 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 46 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "range": [ + 122, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 51 + } + } + } + ], + "else": null, + "range": [ + 86, + 180 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "rest", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 39 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "rest", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 31 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "id", + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "id", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "rest", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 39 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "rest", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 144, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 144, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "id", + "identifiers": [ + { + "type": "Identifier", + "name": "id", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "id", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "context": { + "type": "ArrayPattern", + "elements": [ + { + "type": "Identifier", + "name": "id", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "rest", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "range": [ + 203, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "range": [ + 198, + 211 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 215, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 214, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 219, + 223 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 218, + 224 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "id", + "range": [ + 225, + 227 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "range": [ + 224, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 228, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 218, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 236, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "values", + "range": [ + 248, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 41 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "rest", + "range": [ + 256, + 260 + ], + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 255, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 42 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "range": [ + 248, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "selfClosing": true, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 50 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 263, + 268 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 55 + } + } + }, + "range": [ + 214, + 268 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 55 + } + } + } + ], + "else": null, + "range": [ + 182, + 276 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 11, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "id", + "range": [ + 225, + 227 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "id", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + } + } + ] + }, + { + "name": "rest", + "identifiers": [ + { + "type": "Identifier", + "name": "rest", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "rest", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "context": { + "type": "ArrayPattern", + "elements": [ + { + "type": "Identifier", + "name": "id", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "rest", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "range": [ + 203, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "range": [ + 198, + 211 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 215, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 214, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 219, + 223 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 218, + 224 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "id", + "range": [ + 225, + 227 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "range": [ + 224, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 228, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 218, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 236, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "values", + "range": [ + 248, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 41 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "rest", + "range": [ + 256, + 260 + ], + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 255, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 42 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "range": [ + 248, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 48 + } + } + } + ], + "selfClosing": true, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 50 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 263, + 268 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 55 + } + } + }, + "range": [ + 214, + 268 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 55 + } + } + } + ], + "else": null, + "range": [ + 182, + 276 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 11, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "rest", + "range": [ + 256, + 260 + ], + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "rest", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "id", + "range": [ + 225, + 227 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "id", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "rest", + "range": [ + 256, + 260 + ], + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "rest", + "range": [ + 206, + 210 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 236, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 236, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "objects", + "range": [ + 93, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 144, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 236, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "objects", + "range": [ + 93, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 144, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComponent", + "range": [ + 236, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json new file mode 100644 index 00000000..eeed2e9d --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json @@ -0,0 +1,567 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "todos", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 27, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 26, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 37, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 23, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 51, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "No tasks today!", + "range": [ + 54, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 51, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "range": [ + 42, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + "range": [ + 0, + 81 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 7, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json new file mode 100644 index 00000000..af9742f9 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json @@ -0,0 +1,883 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 8, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 70, + 80 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 157, + 167 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 34, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 34 + }, + "end": { + "line": 1, + "column": 37 + } + } + } + ], + "range": [ + 22, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 37 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 45 + }, + "end": { + "line": 1, + "column": 49 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 45 + }, + "end": { + "line": 1, + "column": 49 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "name", + "range": [ + 45, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 45 + }, + "end": { + "line": 1, + "column": 49 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 50, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 53 + } + } + } + ], + "range": [ + 37, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 53 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 96, + 99 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 37 + } + } + } + ], + "range": [ + 84, + 99 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 37 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "name", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 137, + 140 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 108, + 140 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 174, + 178 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 174, + 178 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": true, + "error": { + "type": "Identifier", + "name": "name", + "range": [ + 174, + 178 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "...", + "range": [ + 179, + 182 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + ], + "range": [ + 149, + 182 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 8, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 70, + 80 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 157, + 167 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 8, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 70, + 80 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 157, + 167 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json new file mode 100644 index 00000000..75a0e1ef --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json @@ -0,0 +1,901 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 105, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "SvelteHTMLComment", + "value": " promise was fulfilled ", + "range": [ + 107, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 137, + 139 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 139, + 142 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The value is ", + "range": [ + 142, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "value", + "range": [ + 156, + 161 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 162, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "range": [ + 139, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "range": [ + 92, + 167 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 156, + 161 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 156, + 161 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 181, + 183 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "SvelteHTMLComment", + "value": " promise was rejected ", + "range": [ + 183, + 212 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 212, + 214 + ], + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "Something went wrong: ", + "range": [ + 217, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 240, + 245 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 246, + 253 + ], + "loc": { + "start": { + "line": 9, + "column": 33 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 240, + 253 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 239, + 254 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 41 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 9, + "column": 41 + }, + "end": { + "line": 9, + "column": 45 + } + } + }, + "range": [ + 214, + 258 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 45 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 45 + }, + "end": { + "line": 10, + "column": 0 + } + } + } + ], + "range": [ + 167, + 259 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 240, + 245 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 240, + 245 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json new file mode 100644 index 00000000..737039cd --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json @@ -0,0 +1,489 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "SvelteHTMLComment", + "value": " promise was fulfilled ", + "range": [ + 104, + 134 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 135, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The value is ", + "range": [ + 138, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "value", + "range": [ + 152, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 151, + 158 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "range": [ + 135, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "range": [ + 90, + 163 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 152, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 152, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json new file mode 100644 index 00000000..bae39a01 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json @@ -0,0 +1,446 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 27, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 29, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The value is ", + "range": [ + 32, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "value", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 45, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 29, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 3, + "column": 0 + } + } + } + ], + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json new file mode 100644 index 00000000..494496fd --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json @@ -0,0 +1,446 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": true, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 28, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The error is ", + "range": [ + 33, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "error", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 46, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 30, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 3, + "column": 0 + } + } + } + ], + "range": [ + 0, + 58 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 8, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json new file mode 100644 index 00000000..35082588 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json @@ -0,0 +1,114 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 6, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 6, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 6, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json new file mode 100644 index 00000000..9170b185 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json @@ -0,0 +1,300 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json new file mode 100644 index 00000000..098c8933 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json @@ -0,0 +1,208 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 15, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 15, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 15, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 15, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json new file mode 100644 index 00000000..5e4c6f4e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 7, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json new file mode 100644 index 00000000..e2252881 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "post", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "post", + "range": [ + 55, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "post", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "post", + "range": [ + 55, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "post", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "post", + "range": [ + 55, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json new file mode 100644 index 00000000..efcebe07 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json @@ -0,0 +1,313 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "var1", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "var2", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "v3", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "varN", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "var1", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "var2", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "v3", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "varN", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "var1", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "var2", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "v3", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "varN", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json new file mode 100644 index 00000000..1f125b60 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json @@ -0,0 +1,494 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "user", + "identifiers": [ + { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "firstname", + "range": [ + 25, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Ada'", + "value": "Ada", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 25, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "lastname", + "range": [ + 45, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Lovelace'", + "value": "Lovelace", + "range": [ + 55, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 45, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "range": [ + 21, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + "range": [ + 14, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 107, + 111 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 107, + 111 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json new file mode 100644 index 00000000..a948a091 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json @@ -0,0 +1,313 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user1", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user2", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user3", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user1", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user2", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user3", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user1", + "range": [ + 40, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user2", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user3", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json new file mode 100644 index 00000000..da97d137 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json @@ -0,0 +1,288 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "variable", + "identifiers": [ + { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "init": { + "type": "Identifier", + "name": "assignment", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "range": [ + 8, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 29 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "variable", + "range": [ + 8, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "assignment", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "assignment", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "assignment", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json new file mode 100644 index 00000000..0b78d9c5 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json @@ -0,0 +1,1463 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "boxes", + "identifiers": [ + { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "init": null, + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "boxes", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "boxes", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "boxes", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "box", + "identifiers": [ + { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "boxes", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteConstTag", + "declaration": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "box", + "range": [ + 78, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 78, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "box", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 90, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 78, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 71, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 63, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 101, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 40 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "box", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 105, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": " * ", + "range": [ + 115, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "box", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 123, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "range": [ + 119, + 129 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "range": [ + 118, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": " = ", + "range": [ + 130, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "area", + "range": [ + 134, + 138 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 36 + } + } + }, + "range": [ + 133, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "else": null, + "range": [ + 40, + 147 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 78, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ] + }, + { + "name": "area", + "identifiers": [ + { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "box", + "range": [ + 78, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 78, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "box", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 90, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 78, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "range": [ + 71, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 39 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "area", + "range": [ + 134, + 138 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 78, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "box", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "box", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "area", + "range": [ + 134, + 138 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "area", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json new file mode 100644 index 00000000..5b6486ef --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json new file mode 100644 index 00000000..50d8ac5c --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json @@ -0,0 +1,908 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 59, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 55, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "range": [ + 27, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 59, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 59, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 55, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "range": [ + 27, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 59, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json new file mode 100644 index 00000000..8b1f7a3b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json @@ -0,0 +1,208 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 48, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json new file mode 100644 index 00000000..7c0a785e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 32, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 32, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 32, + 44 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json new file mode 100644 index 00000000..d5a2f57e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json @@ -0,0 +1,1435 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "counter", + "identifiers": [ + { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 14, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 53, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "increment", + "identifiers": [ + { + "type": "Identifier", + "name": "increment", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "increment", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "counter", + "range": [ + 53, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "counter", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 63, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 53, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 53, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "range": [ + 49, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "params": [], + "range": [ + 28, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [ + 157, + 166 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ] + }, + { + "name": "track", + "identifiers": [ + { + "type": "Identifier", + "name": "track", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "track", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 18 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "trackEvent", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 107, + 124 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "range": [ + 107, + 124 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "range": [ + 103, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "track", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + ], + "range": [ + 81, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "track", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "track", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [ + 157, + 166 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "track", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "track", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 53, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 53, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [ + 63, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 18 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "trackEvent", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 107, + 124 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "range": [ + 107, + 124 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "range": [ + 103, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "track", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + ], + "range": [ + 81, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "trackEvent", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 118, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 96, + 101 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "trackEvent", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "trackEvent", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "trackEvent", + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json new file mode 100644 index 00000000..4612fa74 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json new file mode 100644 index 00000000..88c440ef --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json @@ -0,0 +1,244 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json new file mode 100644 index 00000000..eb594d4d --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json new file mode 100644 index 00000000..a324fcdd --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 33, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 33, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 33, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 33 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json new file mode 100644 index 00000000..b44c4c88 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 91, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 91, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 91, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json new file mode 100644 index 00000000..96f2281a --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json @@ -0,0 +1,313 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 20, + 28 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json new file mode 100644 index 00000000..bea31b0e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json new file mode 100644 index 00000000..bea31b0e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json new file mode 100644 index 00000000..6118b7f7 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 44, + 48 + ], + "loc": { + "start": { + "line": 1, + "column": 44 + }, + "end": { + "line": 1, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json new file mode 100644 index 00000000..4e52f1e8 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json @@ -0,0 +1,1003 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "clip", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "buffered", + "range": [ + 40, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "played", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seekable", + "range": [ + 68, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seeking", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ended", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "currentTime", + "range": [ + 109, + 120 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "playbackRate", + "range": [ + 127, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 146, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "volume", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "muted", + "range": [ + 172, + 177 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "videoWidth", + "range": [ + 184, + 194 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "videoHeight", + "range": [ + 201, + 212 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clip", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "buffered", + "range": [ + 40, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "played", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seekable", + "range": [ + 68, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seeking", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ended", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "currentTime", + "range": [ + 109, + 120 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "playbackRate", + "range": [ + 127, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 146, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "volume", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "muted", + "range": [ + 172, + 177 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "videoWidth", + "range": [ + 184, + 194 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "videoHeight", + "range": [ + 201, + 212 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clip", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "buffered", + "range": [ + 40, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "played", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seekable", + "range": [ + 68, + 76 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seeking", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ended", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "currentTime", + "range": [ + 109, + 120 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "playbackRate", + "range": [ + 127, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 146, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "volume", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "muted", + "range": [ + 172, + 177 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "videoWidth", + "range": [ + 184, + 194 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "videoHeight", + "range": [ + 201, + 212 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json new file mode 100644 index 00000000..72b271b2 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json @@ -0,0 +1,382 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "width", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "height", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "width", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "height", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Chart", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "width", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "height", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "width", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "height", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Chart", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "width", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "height", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "width", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "height", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Chart", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json new file mode 100644 index 00000000..765fa07c --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json new file mode 100644 index 00000000..ef4ee42e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json @@ -0,0 +1,959 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tortilla", + "identifiers": [ + { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "init": { + "type": "Literal", + "raw": "'Plain'", + "value": "Plain", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 14, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 150, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 207, + 215 + ], + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 270, + 278 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "fillings", + "identifiers": [ + { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [], + "range": [ + 50, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 39, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 384, + 392 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 503, + 511 + ], + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 564, + 572 + ], + "loc": { + "start": { + "line": 15, + "column": 35 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 150, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 207, + 215 + ], + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 270, + 278 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tortilla", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 384, + 392 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 503, + 511 + ], + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fillings", + "range": [ + 564, + 572 + ], + "loc": { + "start": { + "line": 15, + "column": 35 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fillings", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json new file mode 100644 index 00000000..c593403e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dom_node", + "range": [ + 16, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dom_node", + "range": [ + 16, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dom_node", + "range": [ + 16, + 24 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json new file mode 100644 index 00000000..99fab42b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json @@ -0,0 +1,943 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onMount", + "identifiers": [ + { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "canvasElement", + "identifiers": [ + { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "init": null, + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 182, + 195 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 182, + 195 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "ctx", + "identifiers": [ + { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'2d'", + "value": "2d", + "range": [ + 122, + 126 + ], + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 43 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getContext", + "range": [ + 111, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "range": [ + 97, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "optional": false, + "range": [ + 97, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "range": [ + 91, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 44 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 141, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "drawStuff", + "range": [ + 131, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 141, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvasElement", + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "drawStuff", + "range": [ + 131, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "drawStuff", + "range": [ + 131, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "drawStuff", + "range": [ + 131, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json new file mode 100644 index 00000000..7f9e0483 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 37, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 37, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 37, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json new file mode 100644 index 00000000..b24e5b1f --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json @@ -0,0 +1,451 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 177, + 183 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 254, + 260 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 278, + 284 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "isAdmin", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 9, + "column": 49 + }, + "end": { + "line": 9, + "column": 56 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 177, + 183 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 254, + 260 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 278, + 284 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "isAdmin", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 9, + "column": 49 + }, + "end": { + "line": 9, + "column": 56 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 177, + 183 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 254, + 260 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 278, + 284 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "isAdmin", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 9, + "column": 49 + }, + "end": { + "line": 9, + "column": 56 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json new file mode 100644 index 00000000..3fed4aeb --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "property", + "range": [ + 73, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "property", + "range": [ + 73, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "property", + "range": [ + 73, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json new file mode 100644 index 00000000..56146b73 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json @@ -0,0 +1,313 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "myColor", + "range": [ + 148, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 310, + 315 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "darkMode", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 12, + "column": 61 + }, + "end": { + "line": 12, + "column": 69 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "myColor", + "range": [ + 148, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 310, + 315 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "darkMode", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 12, + "column": 61 + }, + "end": { + "line": 12, + "column": 69 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "myColor", + "range": [ + 148, + 155 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 310, + 315 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "darkMode", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 12, + "column": 61 + }, + "end": { + "line": 12, + "column": 69 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json new file mode 100644 index 00000000..7bad5ae1 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json @@ -0,0 +1,1420 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "action", + "identifiers": [ + { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "update", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "parameters", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + ], + "range": [ + 66, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 58, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 94, + 101 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 94, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "range": [ + 48, + 117 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "parameters", + "range": [ + 32, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "range": [ + 25, + 118 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "range": [ + 16, + 118 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "action", + "range": [ + 139, + 145 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "action", + "range": [ + 157, + 163 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "action", + "range": [ + 139, + 145 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "parameters", + "range": [ + 165, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "action", + "range": [ + 157, + 163 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "action", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "update", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "parameters", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + ], + "range": [ + 66, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 58, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 94, + 101 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 94, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "range": [ + 48, + 117 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "parameters", + "range": [ + 32, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "range": [ + 25, + 118 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ], + "references": [] + }, + { + "name": "parameters", + "identifiers": [ + { + "type": "Identifier", + "name": "parameters", + "range": [ + 32, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "parameters", + "range": [ + 32, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "update", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "parameters", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + ], + "range": [ + 66, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 58, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 94, + 101 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 94, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "range": [ + 48, + 117 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "parameters", + "range": [ + 32, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "range": [ + 25, + 118 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "parameters", + "identifiers": [ + { + "type": "Identifier", + "name": "parameters", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "parameters", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "parameters", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + ], + "range": [ + 66, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "parameters", + "range": [ + 165, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "parameters", + "range": [ + 165, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json new file mode 100644 index 00000000..6b8a9a75 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json @@ -0,0 +1,625 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 98, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 95, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "range": [ + 88, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "range": [ + 83, + 154 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "range": [ + 76, + 155 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "range": [ + 29, + 158 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 10, + 158 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 179, + 182 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 179, + 182 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 98, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 95, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "range": [ + 88, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "range": [ + 83, + 154 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "range": [ + 76, + 155 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "range": [ + 29, + 158 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 10, + 158 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json new file mode 100644 index 00000000..13267585 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json @@ -0,0 +1,1536 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "init": null, + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 269, + 272 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "update", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 123, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "range": [ + 117, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "range": [ + 111, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 173, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 183, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 180, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "range": [ + 173, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 14, + "column": 4 + } + } + } + ], + "range": [ + 106, + 239 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + "range": [ + 99, + 240 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 15, + "column": 4 + } + } + } + ], + "range": [ + 52, + 243 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "bar", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "range": [ + 28, + 243 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 264, + 267 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 269, + 272 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 264, + 267 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "update", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 123, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "range": [ + 117, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "range": [ + 111, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 173, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 183, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 180, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "range": [ + 173, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 14, + "column": 4 + } + } + } + ], + "range": [ + 106, + 239 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + "range": [ + 99, + 240 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 15, + "column": 4 + } + } + } + ], + "range": [ + 52, + 243 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "bar", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "range": [ + 28, + 243 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "update", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 123, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "range": [ + 117, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "range": [ + 111, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 173, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 183, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 180, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "range": [ + 173, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 14, + "column": 4 + } + } + } + ], + "range": [ + 106, + 239 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + "range": [ + 99, + 240 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 15, + "column": 4 + } + } + } + ], + "range": [ + 52, + 243 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 37, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "bar", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "range": [ + 28, + 243 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 123, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "range": [ + 117, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 4 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json new file mode 100644 index 00000000..1f467c7a --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json @@ -0,0 +1,2926 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "transition", + "identifiers": [ + { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 72, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 62, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 77, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 77, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 97, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 97, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 117, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 47, + 137 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "range": [ + 28, + 138 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "range": [ + 15, + 138 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "transition", + "range": [ + 15, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 165, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 186, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 216, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 72, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 62, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 77, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 77, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 97, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 97, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 117, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 47, + 137 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "range": [ + 28, + 138 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 72, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 62, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 77, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 77, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 97, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 97, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 117, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 47, + 137 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "range": [ + 28, + 138 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "range": [ + 85, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ], + "references": [] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 102, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + } + ], + "references": [] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 133, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 165, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 186, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 216, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 165, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 186, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 216, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json new file mode 100644 index 00000000..f22fdb21 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json @@ -0,0 +1,208 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json new file mode 100644 index 00000000..f22fdb21 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json @@ -0,0 +1,208 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json new file mode 100644 index 00000000..abff00cc --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json @@ -0,0 +1,5147 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "elasticOut", + "identifiers": [ + { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "local": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 298, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "init": null, + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 398, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "whoosh", + "identifiers": [ + { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 179, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 69 + }, + "end": { + "line": 7, + "column": 75 + } + } + }, + { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 187, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 77 + }, + "end": { + "line": 7, + "column": 79 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 49 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "optional": false, + "range": [ + 138, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 161, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 51 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "range": [ + 138, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "replace", + "range": [ + 171, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "range": [ + 138, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "optional": false, + "range": [ + 138, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 118, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 80 + } + } + } + ], + "range": [ + 112, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 81 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 207, + 212 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "delay", + "range": [ + 221, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 214, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "operator": "||", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 214, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 207, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 236, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "duration", + "range": [ + 253, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "range": [ + 246, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "operator": "||", + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 265, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 246, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 236, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 273, + 279 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 281, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "easing", + "range": [ + 288, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 281, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "operator": "||", + "right": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 298, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "range": [ + 281, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "range": [ + 273, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: ", + "raw": "transform: " + }, + "range": [ + 328, + 342 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 359, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 49 + }, + "end": { + "line": 13, + "column": 59 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": ")", + "raw": ")" + }, + "range": [ + 370, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 60 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 328, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "range": [ + 318, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "range": [ + 313, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 202, + 377 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "range": [ + 195, + 378 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 14, + "column": 4 + } + } + } + ], + "range": [ + 108, + 381 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + ], + "range": [ + 78, + 381 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 416, + 422 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 398, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 179, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 69 + }, + "end": { + "line": 7, + "column": 75 + } + } + }, + { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 187, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 77 + }, + "end": { + "line": 7, + "column": 79 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 49 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "optional": false, + "range": [ + 138, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 161, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 51 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "range": [ + 138, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "replace", + "range": [ + 171, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "range": [ + 138, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "optional": false, + "range": [ + 138, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 118, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 80 + } + } + } + ], + "range": [ + 112, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 81 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 207, + 212 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "delay", + "range": [ + 221, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 214, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "operator": "||", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 214, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 207, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 236, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "duration", + "range": [ + 253, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "range": [ + 246, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "operator": "||", + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 265, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 246, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 236, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 273, + 279 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 281, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "easing", + "range": [ + 288, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 281, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "operator": "||", + "right": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 298, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "range": [ + 281, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "range": [ + 273, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: ", + "raw": "transform: " + }, + "range": [ + 328, + 342 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 359, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 49 + }, + "end": { + "line": 13, + "column": 59 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": ")", + "raw": ")" + }, + "range": [ + 370, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 60 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 328, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "range": [ + 318, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "range": [ + 313, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 202, + 377 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "range": [ + 195, + 378 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 14, + "column": 4 + } + } + } + ], + "range": [ + 108, + 381 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + ], + "range": [ + 78, + 381 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + } + ] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 179, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 69 + }, + "end": { + "line": 7, + "column": 75 + } + } + }, + { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 187, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 77 + }, + "end": { + "line": 7, + "column": 79 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 49 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "optional": false, + "range": [ + 138, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 161, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 51 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "range": [ + 138, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "replace", + "range": [ + 171, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "range": [ + 138, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "optional": false, + "range": [ + 138, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 118, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 80 + } + } + } + ], + "range": [ + 112, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 81 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 207, + 212 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "delay", + "range": [ + 221, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 214, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "operator": "||", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 214, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 207, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 236, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "duration", + "range": [ + 253, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "range": [ + 246, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "operator": "||", + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 265, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 246, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 236, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 273, + 279 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "LogicalExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "params", + "range": [ + 281, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "easing", + "range": [ + 288, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 281, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "operator": "||", + "right": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 298, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "range": [ + 281, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "range": [ + 273, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: ", + "raw": "transform: " + }, + "range": [ + 328, + 342 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 359, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 49 + }, + "end": { + "line": 13, + "column": 59 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": ")", + "raw": ")" + }, + "range": [ + 370, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 60 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 328, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "range": [ + 318, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "range": [ + 313, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 202, + 377 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "range": [ + 195, + 378 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 14, + "column": 4 + } + } + } + ], + "range": [ + 108, + 381 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + ], + "range": [ + 78, + 381 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 281, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + } + ] + }, + { + "name": "existingTransform", + "identifiers": [ + { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 179, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 69 + }, + "end": { + "line": 7, + "column": 75 + } + } + }, + { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 187, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 77 + }, + "end": { + "line": 7, + "column": 79 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 49 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "optional": false, + "range": [ + 138, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 161, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 51 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "range": [ + 138, + 170 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "replace", + "range": [ + 171, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "range": [ + 138, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 68 + } + } + }, + "optional": false, + "range": [ + 138, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 118, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 80 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 45 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 94, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 281, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 298, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: ", + "raw": "transform: " + }, + "range": [ + 328, + 342 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 359, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 49 + }, + "end": { + "line": 13, + "column": 59 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": ")", + "raw": ")" + }, + "range": [ + 370, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 60 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 328, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "range": [ + 318, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + } + ] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: ", + "raw": "transform: " + }, + "range": [ + 328, + 342 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 359, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 49 + }, + "end": { + "line": 13, + "column": 59 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": ")", + "raw": ")" + }, + "range": [ + 370, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 60 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + ], + "range": [ + 328, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + } + ], + "range": [ + 318, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 63 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 59 + }, + "end": { + "line": 13, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 342, + 359 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "existingTransform", + "range": [ + 118, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 298, + 308 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 416, + 422 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 416, + 422 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whoosh", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 138, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json new file mode 100644 index 00000000..cf4d0821 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json @@ -0,0 +1,8801 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 31, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 21, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "typewriter", + "identifiers": [ + { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 110, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 105, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 121, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 105, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 105, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 145, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 140, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 140, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 159, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 140, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 177, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 172, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 140, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 105, + 186 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 92, + 190 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 86, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 214, + 216 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 207, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 199, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 195, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 239, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 234, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 227, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 31 + } + } + } + ], + "range": [ + 221, + 251 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 276, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 271, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 285, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 271, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 260, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "range": [ + 254, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 355, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 355, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 353, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 352, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 348, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 342, + 372 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 382, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 377, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 407, + 408 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 401, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 396, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 396, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 413 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 336, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "range": [ + 326, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 320, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 302, + 422 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 295, + 423 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 82, + 426 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 66, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 40, + 426 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 459, + 469 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 110, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 105, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 121, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 105, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 105, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 145, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 140, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 140, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 159, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 140, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 177, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 172, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 140, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 105, + 186 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 92, + 190 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 86, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 214, + 216 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 207, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 199, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 195, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 239, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 234, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 227, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 31 + } + } + } + ], + "range": [ + 221, + 251 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 276, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 271, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 285, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 271, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 260, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "range": [ + 254, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 355, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 355, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 353, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 352, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 348, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 342, + 372 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 382, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 377, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 407, + 408 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 401, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 396, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 396, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 413 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 336, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "range": [ + 326, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 320, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 302, + 422 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 295, + 423 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 82, + 426 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 66, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 40, + 426 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + }, + { + "name": "speed", + "identifiers": [ + { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 110, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 105, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 121, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 105, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 105, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 145, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 140, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 140, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 159, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 140, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 177, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 172, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 140, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 105, + 186 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 92, + 190 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 86, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 214, + 216 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 207, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 199, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 195, + 217 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 239, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 234, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 227, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 31 + } + } + } + ], + "range": [ + 221, + 251 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 276, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 271, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 285, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 271, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 260, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "range": [ + 254, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 355, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 355, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 353, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 352, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 348, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 342, + 372 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 382, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 377, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 407, + 408 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 401, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 396, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 396, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 413 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 336, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "range": [ + 326, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 320, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 302, + 422 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 295, + 423 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 82, + 426 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 66, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 40, + 426 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 285, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + } + ] + }, + { + "name": "valid", + "identifiers": [ + { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 110, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 105, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 121, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 105, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 105, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 145, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 140, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 140, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 159, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 140, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 177, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 172, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 140, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 105, + 186 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 92, + 190 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 239, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 234, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 227, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + } + ] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 276, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 271, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 285, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 271, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 260, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 285, + 290 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 307, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 355, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 355, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 353, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 352, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 348, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 342, + 372 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 382, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 377, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 407, + 408 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 401, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 396, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 396, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 413 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 336, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "range": [ + 326, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + } + ] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 355, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 355, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 353, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 352, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 348, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 342, + 372 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 382, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 377, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 407, + 408 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 401, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 396, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 396, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 412 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 377, + 413 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 336, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "range": [ + 326, + 418 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + } + ], + "references": [] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 355, + 366 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 355, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 353, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 352, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 348, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 348, + 349 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 355, + 359 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 459, + 469 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 459, + 469 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 49, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 172, + 176 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json new file mode 100644 index 00000000..2a6b92ee --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json @@ -0,0 +1,10560 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 49, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 31, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 489, + 496 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ] + }, + { + "name": "typewriter", + "identifiers": [ + { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 140, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 135, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 135, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 135, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 175, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 170, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 170, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 189, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 170, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 207, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 202, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 170, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 135, + 216 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 122, + 220 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 116, + 221 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 244, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 229, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 225, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "TSNonNullExpression", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 269, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + "range": [ + 257, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 32 + } + } + } + ], + "range": [ + 251, + 282 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 302, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 307, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 302, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 302, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 291, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "range": [ + 285, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 406, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 401, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 401, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 399, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 398, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 394, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 388, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 428, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 423, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 447, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 442, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 442, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 459 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 382, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "range": [ + 357, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 351, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 333, + 468 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 326, + 469 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 112, + 472 + ], + "loc": { + "start": { + "line": 4, + "column": 55 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 4, + "column": 51 + } + } + }, + "range": [ + 98, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 51 + } + } + }, + "range": [ + 98, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 51 + } + } + } + ], + "range": [ + 96, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 53 + } + } + } + ], + "range": [ + 58, + 472 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 505, + 515 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 489, + 496 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 38, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 31, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 140, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 135, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 135, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 135, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 175, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 170, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 170, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 189, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 170, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 207, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 202, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 170, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 135, + 216 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 122, + 220 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 116, + 221 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 244, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 229, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 225, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "TSNonNullExpression", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 269, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + "range": [ + 257, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 32 + } + } + } + ], + "range": [ + 251, + 282 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 302, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 307, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 302, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 302, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 291, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "range": [ + 285, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 406, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 401, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 401, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 399, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 398, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 394, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 388, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 428, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 423, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 447, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 442, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 442, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 459 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 382, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "range": [ + 357, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 351, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 333, + 468 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 326, + 469 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 112, + 472 + ], + "loc": { + "start": { + "line": 4, + "column": 55 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 4, + "column": 51 + } + } + }, + "range": [ + 98, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 51 + } + } + }, + "range": [ + 98, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 51 + } + } + } + ], + "range": [ + 96, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 53 + } + } + } + ], + "range": [ + 58, + 472 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + } + ] + }, + { + "name": "speed", + "identifiers": [ + { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 140, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 135, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 135, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 135, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 175, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 170, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 170, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 189, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 170, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 207, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 202, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 170, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 135, + 216 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 122, + 220 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 116, + 221 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 244, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 229, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 225, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "TSNonNullExpression", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 269, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + "range": [ + 257, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 32 + } + } + } + ], + "range": [ + 251, + 282 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 302, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 307, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 302, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 302, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 291, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "range": [ + 285, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 406, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 401, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 401, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 399, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 398, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 394, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 388, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 428, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 423, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 447, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 442, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 442, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 459 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 382, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "range": [ + 357, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 351, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 333, + 468 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 326, + 469 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 112, + 472 + ], + "loc": { + "start": { + "line": 4, + "column": 55 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 4, + "column": 51 + } + } + }, + "range": [ + 98, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 51 + } + } + }, + "range": [ + 98, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 51 + } + } + } + ], + "range": [ + 96, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 4, + "column": 53 + } + } + } + ], + "range": [ + 58, + 472 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + } + ] + }, + { + "name": "valid", + "identifiers": [ + { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 140, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 135, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 135, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 135, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 175, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 170, + 185 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 170, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 189, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 170, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 207, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 202, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 170, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 135, + 216 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 122, + 220 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "TSNonNullExpression", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 269, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 264, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + "range": [ + 257, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 302, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + } + ] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 302, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 307, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 302, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 302, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 291, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 302, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 41 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 338, + 346 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 291, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 406, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 401, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 401, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 399, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 398, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 394, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 388, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 428, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 423, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 447, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 442, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 442, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 459 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 382, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "range": [ + 357, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + } + } + ] + }, + { + "name": "_u", + "identifiers": [ + { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 406, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 401, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 401, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 399, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 398, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 394, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "range": [ + 388, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 428, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "range": [ + 423, + 439 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 447, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 442, + 452 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 442, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 458 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 39 + } + } + }, + "range": [ + 423, + 459 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 40 + } + } + } + ], + "range": [ + 382, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Identifier", + "name": "_u", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 371, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 370, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "range": [ + 368, + 377 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 29 + } + } + } + ], + "range": [ + 357, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + } + ], + "references": [] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 406, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "range": [ + 401, + 412 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "range": [ + 401, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 399, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 398, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 394, + 417 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 360, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 359, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 358, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 456, + 457 + ], + "loc": { + "start": { + "line": 19, + "column": 37 + }, + "end": { + "line": 19, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 394, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 401, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 82, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 78, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 442, + 446 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 257, + 261 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 505, + 515 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 505, + 515 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 202, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json new file mode 100644 index 00000000..7f9dd719 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json @@ -0,0 +1,705 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 31, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 237, + 243 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 237, + 243 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 31, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 237, + 243 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 31, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 237, + 243 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 31, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 141, + 147 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 190, + 196 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 237, + 243 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json new file mode 100644 index 00000000..47c49438 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json @@ -0,0 +1,448 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 102, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json new file mode 100644 index 00000000..0f591c22 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json @@ -0,0 +1,865 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 8, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 25, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 21, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 62, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 91, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 109, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 105, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 128, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 148, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 8, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 25, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 21, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 62, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 91, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 109, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 105, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 128, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 148, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 8, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 25, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 21, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 43, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 62, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 91, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 109, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 105, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 128, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fn", + "range": [ + 148, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json new file mode 100644 index 00000000..a1c2fa57 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json @@ -0,0 +1,300 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 5, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json new file mode 100644 index 00000000..56a16148 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json @@ -0,0 +1,4530 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "animation", + "identifiers": [ + { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 94, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 116, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 143, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 178, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 202 + ], + "loc": { + "start": { + "line": 2, + "column": 56 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "range": [ + 31, + 203 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "range": [ + 19, + 203 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "animation", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 94, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 116, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 143, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 178, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 202 + ], + "loc": { + "start": { + "line": 2, + "column": 56 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "range": [ + 31, + 203 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ], + "references": [] + }, + { + "name": "from", + "identifiers": [ + { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 94, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 116, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 143, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 178, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 202 + ], + "loc": { + "start": { + "line": 2, + "column": 56 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "range": [ + 31, + 203 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ], + "references": [] + }, + { + "name": "to", + "identifiers": [ + { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 94, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 116, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 143, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 178, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 202 + ], + "loc": { + "start": { + "line": 2, + "column": 56 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "range": [ + 31, + 203 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ], + "references": [] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 94, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 116, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "range": [ + 143, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 178, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 202 + ], + "loc": { + "start": { + "line": 2, + "column": 56 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 32, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 40, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "range": [ + 31, + 203 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + } + } + ], + "references": [] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "'foo :bar'", + "value": "foo :bar", + "range": [ + 158, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "range": [ + 148, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 33 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + } + ], + "references": [] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "range": [ + 184, + 196 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json new file mode 100644 index 00000000..5605059a --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json @@ -0,0 +1,980 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 93, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "modifiers": [], + "range": [ + 96, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "expression": null, + "range": [ + 96, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "range": [ + 109, + 115 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 115, + 120 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 92, + 120 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "else": null, + "range": [ + 56, + 128 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 93, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "modifiers": [], + "range": [ + 96, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "expression": null, + "range": [ + 96, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "range": [ + 109, + 115 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 115, + 120 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 92, + 120 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "else": null, + "range": [ + 56, + 128 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 7 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 104, + 108 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json new file mode 100644 index 00000000..fbbb5e42 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json @@ -0,0 +1,1132 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 7, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 7, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 37, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "modifiers": [], + "range": [ + 40, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 64, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 57, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "range": [ + 55, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 40, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "selfClosing": false, + "range": [ + 36, + 72 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 42 + } + } + }, + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 2, + "column": 43 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 36, + 83 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 48 + } + } + } + ], + "else": null, + "range": [ + 0, + 91 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 42 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + } + ] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 7, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 1, + "column": 21 + }, + "end": { + "line": 1, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 37, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "modifiers": [], + "range": [ + 40, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 64, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 57, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "range": [ + 55, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 40, + 71 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "selfClosing": false, + "range": [ + 36, + 72 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 42 + } + } + }, + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 2, + "column": 43 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 36, + 83 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 48 + } + } + } + ], + "else": null, + "range": [ + 0, + 91 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 42 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 7, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 7, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json new file mode 100644 index 00000000..381c2ca8 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json @@ -0,0 +1,12283 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "cubicOut", + "identifiers": [ + { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "whizz", + "identifiers": [ + { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 252, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "range": [ + 247, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 247, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 247, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 237, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 270, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 270, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 291, + 294 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "range": [ + 291, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 219, + 383 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 212, + 384 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "range": [ + 97, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "whizz", + "range": [ + 448, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 406, + 410 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 252, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "range": [ + 247, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 247, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 247, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 237, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 270, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 270, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 291, + 294 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "range": [ + 291, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 219, + 383 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 212, + 384 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "range": [ + 97, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "from", + "identifiers": [ + { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 252, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "range": [ + 247, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 247, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 247, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 237, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 270, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 270, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 291, + 294 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "range": [ + 291, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 219, + 383 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 212, + 384 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "range": [ + 97, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + } + ] + }, + { + "name": "to", + "identifiers": [ + { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 252, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "range": [ + 247, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 247, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 247, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 237, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 270, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 270, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 291, + 294 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "range": [ + 291, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 219, + 383 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 212, + 384 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "range": [ + 97, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + } + ] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 252, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "range": [ + 247, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 247, + 259 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 247, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "range": [ + 237, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 270, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 270, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 291, + 294 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "range": [ + 291, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 219, + 383 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 212, + 384 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "range": [ + 97, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 387 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "dx", + "identifiers": [ + { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + } + ] + }, + { + "name": "dy", + "identifiers": [ + { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + } + ] + }, + { + "name": "d", + "identifiers": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 257, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "range": [ + 347, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 63 + }, + "end": { + "line": 16, + "column": 66 + } + } + }, + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 66 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "transform: translate(", + "raw": "transform: translate(" + }, + "range": [ + 310, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px, ", + "raw": "px, " + }, + "range": [ + 340, + 347 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "px) rotate(", + "raw": "px) rotate(" + }, + "range": [ + 353, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 47 + }, + "end": { + "line": 16, + "column": 61 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "deg);", + "raw": "deg);" + }, + "range": [ + 372, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 66 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + ], + "range": [ + 310, + 379 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 296, + 379 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 16, + "column": 73 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "u", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "u", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "u", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 367, + 368 + ], + "loc": { + "start": { + "line": 16, + "column": 61 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 338, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 32 + }, + "end": { + "line": 16, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 351, + 353 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 278, + 286 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 406, + 410 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 420, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 427, + 431 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 436, + 439 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "whizz", + "range": [ + 448, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "modifiers": [], + "range": [ + 440, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "expression": null, + "range": [ + 440, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 19 + } + } + } + ], + "selfClosing": false, + "range": [ + 435, + 454 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 455, + 459 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [ + 454, + 460 + ], + "loc": { + "start": { + "line": 22, + "column": 20 + }, + "end": { + "line": 22, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 460, + 466 + ], + "loc": { + "start": { + "line": 22, + "column": 26 + }, + "end": { + "line": 22, + "column": 32 + } + } + }, + "range": [ + 435, + 466 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 32 + } + } + } + ], + "else": null, + "range": [ + 399, + 474 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 427, + 431 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 455, + 459 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + } + } + ] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 420, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 420, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 26 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 406, + 410 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 420, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 427, + 431 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 436, + 439 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "whizz", + "range": [ + 448, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "modifiers": [], + "range": [ + 440, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "expression": null, + "range": [ + 440, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 19 + } + } + } + ], + "selfClosing": false, + "range": [ + 435, + 454 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 455, + 459 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [ + 454, + 460 + ], + "loc": { + "start": { + "line": 22, + "column": 20 + }, + "end": { + "line": 22, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 460, + 466 + ], + "loc": { + "start": { + "line": 22, + "column": 26 + }, + "end": { + "line": 22, + "column": 32 + } + } + }, + "range": [ + 435, + 466 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 32 + } + } + } + ], + "else": null, + "range": [ + 399, + 474 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 7 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 427, + 431 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "whizz", + "range": [ + 448, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 455, + 459 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 15 + }, + "end": { + "line": 21, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "whizz", + "range": [ + 448, + 453 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 406, + 410 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 247, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 406, + 410 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json new file mode 100644 index 00000000..7141aab6 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json @@ -0,0 +1,12300 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "cubicOut", + "identifiers": [ + { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "whizz", + "identifiers": [ + { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 223, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "range": [ + 223, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 245, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 260, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 245, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 267, + 273 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 287, + 291 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 287, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 219, + 379 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "range": [ + 212, + 380 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + } + ], + "range": [ + 97, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "whizz", + "range": [ + 444, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 402, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 223, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "range": [ + 223, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 245, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 260, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 245, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 267, + 273 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 287, + 291 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 287, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 219, + 379 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "range": [ + 212, + 380 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + } + ], + "range": [ + 97, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + }, + { + "name": "from", + "identifiers": [ + { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 223, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "range": [ + 223, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 245, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 260, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 245, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 267, + 273 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 287, + 291 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 287, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 219, + 379 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "range": [ + 212, + 380 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + } + ], + "range": [ + 97, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + } + ] + }, + { + "name": "to", + "identifiers": [ + { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 223, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "range": [ + 223, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 245, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 260, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 245, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 267, + 273 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 287, + 291 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 287, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 219, + 379 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "range": [ + 212, + 380 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + } + ], + "range": [ + 97, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + } + ] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "range": [ + 102, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + ], + "range": [ + 136, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 169, + 208 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 41 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 223, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 9 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "range": [ + 223, + 231 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 245, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 260, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 245, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "range": [ + 235, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 267, + 273 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "range": [ + 267, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 287, + 291 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 287, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 219, + 379 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "range": [ + 212, + 380 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + } + ], + "range": [ + 97, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "range": [ + 75, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 42 + } + } + } + ], + "range": [ + 54, + 383 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "dx", + "identifiers": [ + { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 113, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "left", + "range": [ + 128, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 113, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 108, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + } + ] + }, + { + "name": "dy", + "identifiers": [ + { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 152, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 147, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "top", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 158, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 147, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 142, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + } + ] + }, + { + "name": "d", + "identifiers": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 189, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 199, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 189, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 179, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 179, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 125, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "from", + "range": [ + 147, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "from", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "to", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "to", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dx", + "range": [ + 194, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dx", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dy", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dy", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ] + }, + { + "name": "u", + "identifiers": [ + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "style", + "range": [ + 325, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 338, + 343 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'Blue'", + "value": "Blue", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 30 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "'Pink'", + "value": "Pink", + "range": [ + 355, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "0.5", + "value": 0.5, + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "range": [ + 345, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + "range": [ + 338, + 370 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 36 + } + } + } + ], + "range": [ + 332, + 375 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "assign", + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "range": [ + 306, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 306, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "u", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 293, + 376 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 320, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 17 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 69, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 402, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 416, + 421 + ], + "loc": { + "start": { + "line": 23, + "column": 21 + }, + "end": { + "line": 23, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 23, + "column": 28 + }, + "end": { + "line": 23, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 432, + 435 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "whizz", + "range": [ + 444, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "modifiers": [], + "range": [ + 436, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "expression": null, + "range": [ + 436, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 19 + } + } + } + ], + "selfClosing": false, + "range": [ + 431, + 450 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 451, + 455 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "range": [ + 450, + 456 + ], + "loc": { + "start": { + "line": 24, + "column": 20 + }, + "end": { + "line": 24, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 456, + 462 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 32 + } + } + }, + "range": [ + 431, + 462 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 32 + } + } + } + ], + "else": null, + "range": [ + 395, + 470 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 25, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 23, + "column": 28 + }, + "end": { + "line": 23, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 451, + 455 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + } + } + ] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 416, + 421 + ], + "loc": { + "start": { + "line": 23, + "column": 21 + }, + "end": { + "line": 23, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 416, + 421 + ], + "loc": { + "start": { + "line": 23, + "column": 21 + }, + "end": { + "line": 23, + "column": 26 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 402, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 416, + 421 + ], + "loc": { + "start": { + "line": 23, + "column": 21 + }, + "end": { + "line": 23, + "column": 26 + } + } + }, + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 23, + "column": 28 + }, + "end": { + "line": 23, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 432, + 435 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "whizz", + "range": [ + 444, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "modifiers": [], + "range": [ + 436, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "expression": null, + "range": [ + 436, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 19 + } + } + } + ], + "selfClosing": false, + "range": [ + 431, + 450 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 451, + 455 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "range": [ + 450, + 456 + ], + "loc": { + "start": { + "line": 24, + "column": 20 + }, + "end": { + "line": 24, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 456, + 462 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 32 + } + } + }, + "range": [ + 431, + 462 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 32 + } + } + } + ], + "else": null, + "range": [ + 395, + 470 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 25, + "column": 7 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 423, + 427 + ], + "loc": { + "start": { + "line": 23, + "column": 28 + }, + "end": { + "line": 23, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "whizz", + "range": [ + 444, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 451, + 455 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 410, + 414 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "whizz", + "range": [ + 444, + 449 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "whizz", + "range": [ + 63, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 402, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 245, + 249 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Object", + "range": [ + 306, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 402, + 406 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json new file mode 100644 index 00000000..699043a7 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 22, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 22, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 22, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json new file mode 100644 index 00000000..7a9359d0 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "SomeComponent", + "range": [ + 1, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "SomeComponent", + "range": [ + 1, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "SomeComponent", + "range": [ + 1, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json new file mode 100644 index 00000000..be31776c --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "SomeComponent", + "range": [ + 1, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "SomeComponent", + "range": [ + 1, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "SomeComponent", + "range": [ + 1, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json new file mode 100644 index 00000000..49859bb0 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json new file mode 100644 index 00000000..360c7fdd --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 100, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 100, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 100, + 105 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json new file mode 100644 index 00000000..9845c2d8 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 137, + 143 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 137, + 143 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Slider", + "range": [ + 137, + 143 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json new file mode 100644 index 00000000..f76e8881 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 23, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 23, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 23, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json new file mode 100644 index 00000000..606b932b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 20, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 20, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 20, + 23 + ], + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json new file mode 100644 index 00000000..d6bc558d --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "component_instance", + "range": [ + 19, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "component_instance", + "range": [ + 19, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "component_instance", + "range": [ + 19, + 37 + ], + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyComp", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json new file mode 100644 index 00000000..edecea97 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json @@ -0,0 +1,277 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 25, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ShoppingCart", + "range": [ + 1, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 25, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ShoppingCart", + "range": [ + 1, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 25, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ShoppingCart", + "range": [ + 1, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cart", + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json new file mode 100644 index 00000000..a23f7593 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json new file mode 100644 index 00000000..bcd9acb3 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 171, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 171, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 171, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 246, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json new file mode 100644 index 00000000..e77046d6 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json new file mode 100644 index 00000000..99ef9273 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "HeaderComponent", + "range": [ + 195, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "HeaderComponent", + "range": [ + 195, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "HeaderComponent", + "range": [ + 195, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json new file mode 100644 index 00000000..b815e9e5 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json @@ -0,0 +1,184 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Card", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Card", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Card", + "range": [ + 250, + 254 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json new file mode 100644 index 00000000..edb0ab26 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json @@ -0,0 +1,1299 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 149, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "fancy", + "range": [ + 67, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "range": [ + 60, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "selfClosing": false, + "range": [ + 56, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 74, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "slot", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "prop", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + ], + "range": [ + 84, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + ], + "selfClosing": false, + "range": [ + 78, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "children": [], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 96, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 28 + } + } + }, + "range": [ + 78, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 28 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 106, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "range": [ + 56, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + } + ], + "else": null, + "range": [ + 32, + 120 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "thing", + "identifiers": [ + { + "type": "Identifier", + "name": "thing", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 34 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "thing", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 34 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 149, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteShorthandAttribute", + "key": { + "type": "Identifier", + "name": "items", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "value": { + "type": "Identifier", + "name": "items", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "prop", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "modifiers": [], + "range": [ + 167, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "expression": { + "type": "Identifier", + "name": "thing", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 34 + } + } + }, + "range": [ + 167, + 183 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 35 + } + } + } + ], + "selfClosing": false, + "range": [ + 148, + 184 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 184, + 186 + ], + "loc": { + "start": { + "line": 11, + "column": 36 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 186, + 191 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "thing", + "range": [ + 192, + 197 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 198, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "range": [ + 192, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "range": [ + 191, + 203 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 18 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 203, + 209 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 186, + 209 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 13, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 210, + 222 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "range": [ + 148, + 222 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "thing", + "range": [ + 192, + 197 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thing", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 34 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "thing", + "range": [ + 192, + 197 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thing", + "range": [ + 177, + 182 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 34 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 149, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 149, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json new file mode 100644 index 00000000..437f8639 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json @@ -0,0 +1,1203 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 196, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 185, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 57, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "fancy", + "range": [ + 67, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "range": [ + 60, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "selfClosing": false, + "range": [ + 56, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 74, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "slot", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "name", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "range": [ + 84, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + { + "type": "SvelteShorthandAttribute", + "key": { + "type": "Identifier", + "name": "item", + "range": [ + 97, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "value": { + "type": "Identifier", + "name": "item", + "range": [ + 97, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "selfClosing": false, + "range": [ + 78, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 28 + } + } + }, + "children": [], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 28 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + "range": [ + 78, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 3 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 110, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 113, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "range": [ + 56, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + } + ], + "else": null, + "range": [ + 32, + 127 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 97, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 97, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 48, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 206, + 209 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 210, + 214 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 216, + 220 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 16 + } + } + } + ], + "range": [ + 210, + 221 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 222, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "range": [ + 222, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 26 + } + } + } + ], + "selfClosing": false, + "range": [ + 205, + 231 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 28 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 33 + }, + "end": { + "line": 14, + "column": 37 + } + } + }, + "range": [ + 232, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 28 + }, + "end": { + "line": 14, + "column": 37 + } + } + }, + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 14, + "column": 27 + }, + "end": { + "line": 14, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 242, + 248 + ], + "loc": { + "start": { + "line": 14, + "column": 38 + }, + "end": { + "line": 14, + "column": 44 + } + } + }, + "range": [ + 205, + 248 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 44 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 28 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 28 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 196, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 185, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 196, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 185, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json new file mode 100644 index 00000000..fc73df75 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json @@ -0,0 +1,497 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "init": null, + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 110, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 110, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 77, + 82 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 110, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json new file mode 100644 index 00000000..ff79b4f9 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 24, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 24, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 24, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json new file mode 100644 index 00000000..833f1994 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 57 + }, + "end": { + "line": 1, + "column": 60 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "currentSelection", + "range": [ + 24, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 57 + }, + "end": { + "line": 1, + "column": 60 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "currentSelection", + "range": [ + 24, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 1, + "column": 57 + }, + "end": { + "line": 1, + "column": 60 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "currentSelection", + "range": [ + 24, + 40 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json new file mode 100644 index 00000000..b7452abe --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 22, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 22, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 22, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json new file mode 100644 index 00000000..e20a2ab1 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json @@ -0,0 +1,502 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tag", + "identifiers": [ + { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "'div'", + "value": "div", + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 14, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 81, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + }, + { + "name": "handler", + "identifiers": [ + { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "init": null, + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 96, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 96, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handler", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 81, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json new file mode 100644 index 00000000..b91f71ce --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json new file mode 100644 index 00000000..0f0e4448 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json new file mode 100644 index 00000000..7e51c90e --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json @@ -0,0 +1,907 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "handleKeydown", + "identifiers": [ + { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 65, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "pressed the ", + "raw": "pressed the " + }, + "range": [ + 50, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": " key", + "raw": " key" + }, + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 50, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 44, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + "range": [ + 44, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 40, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "range": [ + 10, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 124, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 124, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 65, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "pressed the ", + "raw": "pressed the " + }, + "range": [ + 50, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": " key", + "raw": " key" + }, + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 50, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 44, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 39 + } + } + }, + "range": [ + 44, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 40, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "range": [ + 10, + 85 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json new file mode 100644 index 00000000..223b3770 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json new file mode 100644 index 00000000..e3be4aef --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 1, + "column": 27 + }, + "end": { + "line": 1, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json new file mode 100644 index 00000000..0b12bfe2 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleVisibilityChange", + "range": [ + 39, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "someAction", + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handleVisibilityChange", + "range": [ + 39, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "someAction", + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handleVisibilityChange", + "range": [ + 39, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "someAction", + "range": [ + 68, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json new file mode 100644 index 00000000..2dbb0d2f --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handler", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 23 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json new file mode 100644 index 00000000..34802cb7 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json @@ -0,0 +1,175 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 29, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 63, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 29, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 63, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 29, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 63, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json new file mode 100644 index 00000000..5eb6b12b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json new file mode 100644 index 00000000..e77046d6 --- /dev/null +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Widget", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json new file mode 100644 index 00000000..6cf870a5 --- /dev/null +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json @@ -0,0 +1,636 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Foo", + "identifiers": [ + { + "type": "Identifier", + "name": "Foo", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Foo", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Foo", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Foo", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Foo", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Array", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "Array", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 57, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "context": { + "type": "Identifier", + "name": "i", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Foo", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 81, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "i", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "range": [ + 86, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 89, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 81, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "else": null, + "range": [ + 50, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 28 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Foo", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Foo", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Foo", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Foo", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Array", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Array", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json new file mode 100644 index 00000000..6947f25c --- /dev/null +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json @@ -0,0 +1,298 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'world'", + "value": "world", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 14, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json new file mode 100644 index 00000000..9dceaa1d --- /dev/null +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Nested", + "identifiers": [ + { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json new file mode 100644 index 00000000..882f9421 --- /dev/null +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json @@ -0,0 +1,773 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 130, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 50, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [], + "range": [ + 27, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 130, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json new file mode 100644 index 00000000..894f218b --- /dev/null +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json @@ -0,0 +1,3264 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "quintOut", + "identifiers": [ + { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 835, + 843 + ], + "loc": { + "start": { + "line": 48, + "column": 53 + }, + "end": { + "line": 48, + "column": 61 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "fade", + "identifiers": [ + { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 46, + "column": 9 + }, + "end": { + "line": 46, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 1159, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + }, + { + "name": "draw", + "identifiers": [ + { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "local": { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "draw", + "range": [ + 945, + 949 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ] + }, + { + "name": "fly", + "identifiers": [ + { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "local": { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 1080, + 1083 + ], + "loc": { + "start": { + "line": 60, + "column": 27 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + } + ] + }, + { + "name": "expand", + "identifiers": [ + { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "local": { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expand", + "range": [ + 789, + 795 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + }, + { + "name": "inner", + "identifiers": [ + { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "inner", + "range": [ + 1024, + 1029 + ], + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "name": "outer", + "identifiers": [ + { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "local": { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "outer", + "range": [ + 916, + 921 + ], + "loc": { + "start": { + "line": 50, + "column": 7 + }, + "end": { + "line": 50, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 217, + 221 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 207, + 221 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 653, + 660 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 1296, + 1303 + ], + "loc": { + "start": { + "line": 70, + "column": 38 + }, + "end": { + "line": 70, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 653, + 660 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 1296, + 1303 + ], + "loc": { + "start": { + "line": 70, + "column": 38 + }, + "end": { + "line": 70, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 207, + 214 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 46, + "column": 9 + }, + "end": { + "line": 46, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 835, + 843 + ], + "loc": { + "start": { + "line": 48, + "column": 53 + }, + "end": { + "line": 48, + "column": 61 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expand", + "range": [ + 789, + 795 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "outer", + "range": [ + 916, + 921 + ], + "loc": { + "start": { + "line": 50, + "column": 7 + }, + "end": { + "line": 50, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "draw", + "range": [ + 945, + 949 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "inner", + "range": [ + 1024, + 1029 + ], + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 1080, + 1083 + ], + "loc": { + "start": { + "line": 60, + "column": 27 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "char", + "identifiers": [ + { + "type": "Identifier", + "name": "char", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "char", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Literal", + "raw": "'SVELTE'", + "value": "SVELTE", + "range": [ + 1122, + 1130 + ], + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "char", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 25 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 1140, + 1141 + ], + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 1147, + 1151 + ], + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 62, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 1159, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "modifiers": [], + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 4 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "intro": true, + "outro": false, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 1167, + 1172 + ], + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 20 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 63, + "column": 22 + }, + "end": { + "line": 63, + "column": 26 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 1181, + 1182 + ], + "loc": { + "start": { + "line": 63, + "column": 29 + }, + "end": { + "line": 63, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "150", + "value": 150, + "range": [ + 1185, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 33 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + "range": [ + 1181, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 29 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + "range": [ + 1174, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 22 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + "range": [ + 1167, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 1190, + 1198 + ], + "loc": { + "start": { + "line": 63, + "column": 38 + }, + "end": { + "line": 63, + "column": 46 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "800", + "value": 800, + "range": [ + 1200, + 1203 + ], + "loc": { + "start": { + "line": 63, + "column": 48 + }, + "end": { + "line": 63, + "column": 51 + } + } + }, + "range": [ + 1190, + 1203 + ], + "loc": { + "start": { + "line": 63, + "column": 38 + }, + "end": { + "line": 63, + "column": 51 + } + } + } + ], + "range": [ + 1166, + 1204 + ], + "loc": { + "start": { + "line": 63, + "column": 14 + }, + "end": { + "line": 63, + "column": 52 + } + } + }, + "range": [ + 1156, + 1206 + ], + "loc": { + "start": { + "line": 63, + "column": 4 + }, + "end": { + "line": 63, + "column": 54 + } + } + } + ], + "selfClosing": false, + "range": [ + 1146, + 1211 + ], + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 64, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "char", + "range": [ + 1212, + 1216 + ], + "loc": { + "start": { + "line": 64, + "column": 5 + }, + "end": { + "line": 64, + "column": 9 + } + } + }, + "range": [ + 1211, + 1217 + ], + "loc": { + "start": { + "line": 64, + "column": 4 + }, + "end": { + "line": 64, + "column": 10 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1217, + 1224 + ], + "loc": { + "start": { + "line": 64, + "column": 10 + }, + "end": { + "line": 64, + "column": 17 + } + } + }, + "range": [ + 1146, + 1224 + ], + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 64, + "column": 17 + } + } + } + ], + "else": null, + "range": [ + 1115, + 1234 + ], + "loc": { + "start": { + "line": 61, + "column": 2 + }, + "end": { + "line": 65, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "char", + "range": [ + 1212, + 1216 + ], + "loc": { + "start": { + "line": 64, + "column": 5 + }, + "end": { + "line": 64, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "char", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 25 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 1140, + 1141 + ], + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 1140, + 1141 + ], + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Literal", + "raw": "'SVELTE'", + "value": "SVELTE", + "range": [ + 1122, + 1130 + ], + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "char", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 25 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 1140, + 1141 + ], + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 1147, + 1151 + ], + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 62, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 1159, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "modifiers": [], + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 4 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "intro": true, + "outro": false, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 1167, + 1172 + ], + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 20 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 63, + "column": 22 + }, + "end": { + "line": 63, + "column": 26 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 1181, + 1182 + ], + "loc": { + "start": { + "line": 63, + "column": 29 + }, + "end": { + "line": 63, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "150", + "value": 150, + "range": [ + 1185, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 33 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + "range": [ + 1181, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 29 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + "range": [ + 1174, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 22 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + "range": [ + 1167, + 1188 + ], + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 36 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 1190, + 1198 + ], + "loc": { + "start": { + "line": 63, + "column": 38 + }, + "end": { + "line": 63, + "column": 46 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "800", + "value": 800, + "range": [ + 1200, + 1203 + ], + "loc": { + "start": { + "line": 63, + "column": 48 + }, + "end": { + "line": 63, + "column": 51 + } + } + }, + "range": [ + 1190, + 1203 + ], + "loc": { + "start": { + "line": 63, + "column": 38 + }, + "end": { + "line": 63, + "column": 51 + } + } + } + ], + "range": [ + 1166, + 1204 + ], + "loc": { + "start": { + "line": 63, + "column": 14 + }, + "end": { + "line": 63, + "column": 52 + } + } + }, + "range": [ + 1156, + 1206 + ], + "loc": { + "start": { + "line": 63, + "column": 4 + }, + "end": { + "line": 63, + "column": 54 + } + } + } + ], + "selfClosing": false, + "range": [ + 1146, + 1211 + ], + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 64, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "char", + "range": [ + 1212, + 1216 + ], + "loc": { + "start": { + "line": 64, + "column": 5 + }, + "end": { + "line": 64, + "column": 9 + } + } + }, + "range": [ + 1211, + 1217 + ], + "loc": { + "start": { + "line": 64, + "column": 4 + }, + "end": { + "line": 64, + "column": 10 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1217, + 1224 + ], + "loc": { + "start": { + "line": 64, + "column": 10 + }, + "end": { + "line": 64, + "column": 17 + } + } + }, + "range": [ + 1146, + 1224 + ], + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 64, + "column": 17 + } + } + } + ], + "else": null, + "range": [ + 1115, + 1234 + ], + "loc": { + "start": { + "line": 61, + "column": 2 + }, + "end": { + "line": 65, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 1181, + 1182 + ], + "loc": { + "start": { + "line": 63, + "column": 29 + }, + "end": { + "line": 63, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 1140, + 1141 + ], + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 1181, + 1182 + ], + "loc": { + "start": { + "line": 63, + "column": 29 + }, + "end": { + "line": 63, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 1140, + 1141 + ], + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 1159, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "char", + "range": [ + 1212, + 1216 + ], + "loc": { + "start": { + "line": 64, + "column": 5 + }, + "end": { + "line": 64, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "char", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 25 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 1159, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 46, + "column": 9 + }, + "end": { + "line": 46, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 835, + 843 + ], + "loc": { + "start": { + "line": 48, + "column": 53 + }, + "end": { + "line": 48, + "column": 61 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expand", + "range": [ + 789, + 795 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expand", + "range": [ + 116, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "outer", + "range": [ + 916, + 921 + ], + "loc": { + "start": { + "line": 50, + "column": 7 + }, + "end": { + "line": 50, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "outer", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "draw", + "range": [ + 945, + 949 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "draw", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "inner", + "range": [ + 1024, + 1029 + ], + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "inner", + "range": [ + 167, + 172 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 1080, + 1083 + ], + "loc": { + "start": { + "line": 60, + "column": 27 + }, + "end": { + "line": 60, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 1159, + 1163 + ], + "loc": { + "start": { + "line": 63, + "column": 7 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json new file mode 100644 index 00000000..dcf6176a --- /dev/null +++ b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json @@ -0,0 +1,298 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 39, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json new file mode 100644 index 00000000..084048b0 --- /dev/null +++ b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json @@ -0,0 +1,218 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "_", + "identifiers": [ + { + "type": "Identifier", + "name": "_", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "_", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "_", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "_", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$_", + "range": [ + 103, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "_", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$_", + "range": [ + 103, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "_", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json b/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json new file mode 100644 index 00000000..dc781fe1 --- /dev/null +++ b/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json @@ -0,0 +1,197 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 5, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 26, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 5, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 26, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 5, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "expression", + "range": [ + 26, + 36 + ], + "loc": { + "start": { + "line": 1, + "column": 26 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json new file mode 100644 index 00000000..e5f380e1 --- /dev/null +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json @@ -0,0 +1,298 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 21, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json new file mode 100644 index 00000000..4663b307 --- /dev/null +++ b/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json @@ -0,0 +1,298 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 21, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 13, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json new file mode 100644 index 00000000..3e9b17eb --- /dev/null +++ b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json @@ -0,0 +1,3176 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "message", + "identifiers": [ + { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "init": null, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 300, + 307 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + } + ] + }, + { + "name": "formatMessage", + "identifiers": [ + { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": true, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "NewExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "message", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "resolve", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 188, + 204 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "range": [ + 188, + 205 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "range": [ + 178, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "range": [ + 167, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Promise", + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "range": [ + 155, + 216 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "range": [ + 148, + 217 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 138, + 223 + ], + "loc": { + "start": { + "line": 3, + "column": 77 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "returnType": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 127, + 133 + ], + "loc": { + "start": { + "line": 3, + "column": 66 + }, + "end": { + "line": 3, + "column": 72 + } + } + } + ], + "range": [ + 126, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 65 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 65 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + "range": [ + 117, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 56 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + "range": [ + 94, + 223 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "range": [ + 78, + 223 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 286, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "message", + "identifiers": [ + { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": true, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "NewExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "message", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "resolve", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 188, + 204 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "range": [ + 188, + 205 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "range": [ + 178, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "range": [ + 167, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Promise", + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "range": [ + 155, + 216 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "range": [ + 148, + 217 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 6, + "column": 11 + } + } + } + ], + "range": [ + 138, + 223 + ], + "loc": { + "start": { + "line": 3, + "column": 77 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "returnType": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 127, + 133 + ], + "loc": { + "start": { + "line": 3, + "column": 66 + }, + "end": { + "line": 3, + "column": 72 + } + } + } + ], + "range": [ + 126, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 65 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 65 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + "range": [ + 117, + 134 + ], + "loc": { + "start": { + "line": 3, + "column": 56 + }, + "end": { + "line": 3, + "column": 73 + } + } + }, + "range": [ + 94, + 223 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 65 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "resolve", + "identifiers": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "message", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "resolve", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 188, + 204 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "range": [ + 188, + 205 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "range": [ + 178, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "range": [ + 167, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "resolve", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "resolve", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "resolve", + "range": [ + 167, + 174 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 49 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 101, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 65 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 286, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 300, + 307 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "result", + "identifiers": [ + { + "type": "Identifier", + "name": "result", + "range": [ + 340, + 346 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "result", + "range": [ + 340, + 346 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "result", + "range": [ + 340, + 346 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 347, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "result", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "range": [ + 356, + 364 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 16 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "range": [ + 333, + 369 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "result", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "result", + "range": [ + 340, + 346 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "result", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "result", + "range": [ + 340, + 346 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 286, + 299 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatMessage", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 300, + 307 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + ], + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 41, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + "range": [ + 34, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 40 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 65 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 159, + 166 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json new file mode 100644 index 00000000..6d635a13 --- /dev/null +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json @@ -0,0 +1,494 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "f", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "k", + "identifiers": [ + { + "type": "Identifier", + "name": "k", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "k", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "f", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 7, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + "context": { + "type": "Identifier", + "name": "k", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Csdf", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 25, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "children": [], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 25, + 38 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "else": null, + "range": [ + 0, + 45 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 28 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Csdf", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Csdf", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "f", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Csdf", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "f", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Csdf", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json new file mode 100644 index 00000000..f1b3fe4b --- /dev/null +++ b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json @@ -0,0 +1,1853 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "init": { + "type": "Literal", + "raw": "null", + "value": null, + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "range": [ + 32, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "name": "p", + "identifiers": [ + { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Promise", + "range": [ + 71, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "resolve", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 71, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 71, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 67, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 71, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "v", + "identifiers": [ + { + "type": "Identifier", + "name": "v", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "v", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "v", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 121, + 124 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "SvelteIfBlock", + "elseif": false, + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "operator": "!=", + "right": { + "type": "Literal", + "raw": "null", + "value": null, + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "range": [ + 129, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "children": [], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [], + "range": [ + 144, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "range": [ + 124, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + ], + "range": [ + 112, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSStringKeyword", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 37, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 35, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 32, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 71, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 71, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json new file mode 100644 index 00000000..f418d6b1 --- /dev/null +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json @@ -0,0 +1,381 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "prerender", + "identifiers": [ + { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 40, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ] + }, + { + "name": "Counter", + "identifiers": [ + { + "type": "Identifier", + "name": "Counter", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Counter", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Counter", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Counter", + "range": [ + 492, + 499 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Counter", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "prerender", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Counter", + "range": [ + 492, + 499 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Counter", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json new file mode 100644 index 00000000..1518de1c --- /dev/null +++ b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json @@ -0,0 +1,1492 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 13, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 182, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 228, + 233 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 264, + 269 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "doubled", + "identifiers": [ + { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 37, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 27, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 247, + 254 + ], + "loc": { + "start": { + "line": 14, + "column": 23 + }, + "end": { + "line": 14, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 90, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 90, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "range": [ + 107, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "range": [ + 107, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 104, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 90, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + "params": [], + "range": [ + 81, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 150, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 90, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "quadrupled", + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 150, + 161 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 90, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 174, + 179 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 182, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 228, + 233 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 247, + 254 + ], + "loc": { + "start": { + "line": 14, + "column": 23 + }, + "end": { + "line": 14, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 27, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 3 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 264, + 269 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "quadrupled", + "range": [ + 286, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 26 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 13, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "quadrupled", + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "quadrupled", + "range": [ + 286, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 26 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "quadrupled", + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "quadrupled", + "range": [ + 286, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 26 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json new file mode 100644 index 00000000..d5b190b7 --- /dev/null +++ b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json @@ -0,0 +1,2848 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "FancyList", + "identifiers": [ + { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 188, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "data", + "identifiers": [ + { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "foo", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "modifiers": [], + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "expression": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 59, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "selfClosing": false, + "range": [ + 48, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "data", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item3", + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "modifiers": [], + "range": [ + 120, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "expression": { + "type": "Identifier", + "name": "bar", + "range": [ + 131, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "range": [ + 120, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 52 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 53 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 53 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 140, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 139, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 150, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 152, + 158 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 158 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 158, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "range": [ + 160, + 166 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": " no-def\n", + "range": [ + 166, + 174 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 10, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 174, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 48, + 186 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item3", + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "modifiers": [], + "range": [ + 120, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "expression": { + "type": "Identifier", + "name": "bar", + "range": [ + 131, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "range": [ + 120, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 52 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 53 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 53 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 140, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 139, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 150, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 152, + 158 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 158 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ] + }, + { + "name": "item2", + "identifiers": [ + { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item3", + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "modifiers": [], + "range": [ + 120, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "expression": { + "type": "Identifier", + "name": "bar", + "range": [ + 131, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "range": [ + 120, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 52 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 53 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 53 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 140, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 139, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 150, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 152, + 158 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 158 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 131, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 51 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 131, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item3", + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "modifiers": [], + "range": [ + 120, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "expression": { + "type": "Identifier", + "name": "bar", + "range": [ + 131, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + "range": [ + 120, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 52 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 53 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 53 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 140, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 139, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 150, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 152, + 158 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 158 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 140, + 144 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 188, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 188, + 192 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json new file mode 100644 index 00000000..98dd33c3 --- /dev/null +++ b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json @@ -0,0 +1,709 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Hoverable", + "identifiers": [ + { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "active", + "identifiers": [ + { + "type": "Identifier", + "name": "active", + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 37 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "active", + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 37 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "hovering", + "range": [ + 80, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "modifiers": [], + "range": [ + 76, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "expression": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 92, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "active", + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 37 + } + } + }, + "range": [ + 92, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 27 + }, + "end": { + "line": 5, + "column": 37 + } + } + } + ], + "range": [ + 91, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 38 + } + } + }, + "range": [ + 76, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 40 + } + } + } + ], + "selfClosing": false, + "range": [ + 65, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 106, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 41 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 109, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Class", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "active", + "range": [ + 119, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "modifiers": [], + "range": [ + 113, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "expression": { + "type": "Identifier", + "name": "active", + "range": [ + 119, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "shorthand": true, + "range": [ + 113, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "selfClosing": true, + "range": [ + 108, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 108, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 129, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 65, + 141 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 119, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "active", + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 37 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 119, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "active", + "range": [ + 96, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 37 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json new file mode 100644 index 00000000..8715fb62 --- /dev/null +++ b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json @@ -0,0 +1,2325 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "FancyList", + "identifiers": [ + { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "data", + "identifiers": [ + { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "FancyList", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "foo", + "range": [ + 63, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "modifiers": [], + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "expression": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 59, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "selfClosing": false, + "range": [ + 48, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "data", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 120, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 42 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item2", + "range": [ + 127, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "class", + "range": [ + 133, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 50 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 127, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 43 + }, + "end": { + "line": 6, + "column": 56 + } + } + } + ], + "range": [ + 120, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 56 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 140 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 57 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 140, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 57 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 144, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 144, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 143, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 154, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 156, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 9, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 163, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "range": [ + 48, + 175 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "data", + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "data", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 120, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 42 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item2", + "range": [ + 127, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "class", + "range": [ + 133, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 50 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 127, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 43 + }, + "end": { + "line": 6, + "column": 56 + } + } + } + ], + "range": [ + 120, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 56 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 140 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 57 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 140, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 57 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 144, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 144, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 143, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 154, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 156, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 144, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ] + }, + { + "name": "item2", + "identifiers": [ + { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "item", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "modifiers": [], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "modifiers": [], + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 120, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 42 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item2", + "range": [ + 127, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "class", + "range": [ + 133, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 50 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 127, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 43 + }, + "end": { + "line": 6, + "column": 56 + } + } + } + ], + "range": [ + 120, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 56 + } + } + } + ], + "selfClosing": false, + "range": [ + 84, + 140 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 57 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 140, + 143 + ], + "loc": { + "start": { + "line": 6, + "column": 57 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 144, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 144, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 143, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 154, + 156 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 156, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "range": [ + 84, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item2", + "range": [ + 127, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item2", + "range": [ + 127, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 44 + }, + "end": { + "line": 6, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item2", + "range": [ + 114, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 36 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 144, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 105, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json new file mode 100644 index 00000000..c275de6d --- /dev/null +++ b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json @@ -0,0 +1,815 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "collapsed", + "identifiers": [ + { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "range": [ + 110, + 127 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 28 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "collapsed", + "range": [ + 110, + 119 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "something", + "identifiers": [ + { + "type": "Identifier", + "name": "something", + "range": [ + 202, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 44 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "something", + "range": [ + 202, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 44 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:self", + "range": [ + 176, + 187 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "collapsed", + "range": [ + 188, + 197 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + "boolean": true, + "value": [], + "range": [ + 188, + 197 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "something", + "range": [ + 202, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 44 + } + } + }, + "modifiers": [], + "range": [ + 198, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 44 + } + } + }, + "expression": { + "type": "Identifier", + "name": "something", + "range": [ + 202, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 44 + } + } + }, + "range": [ + 198, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 44 + } + } + } + ], + "selfClosing": false, + "range": [ + 175, + 212 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 212, + 225 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "slot", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteShorthandAttribute", + "key": { + "type": "Identifier", + "name": "something", + "range": [ + 232, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "value": { + "type": "Identifier", + "name": "something", + "range": [ + 232, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 29 + } + } + } + ], + "selfClosing": true, + "range": [ + 225, + 245 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 225, + 245 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 254, + 268 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 175, + 268 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "something", + "range": [ + 232, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "something", + "range": [ + 202, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 44 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "something", + "range": [ + 232, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "something", + "range": [ + 202, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 44 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json new file mode 100644 index 00000000..cfa04a30 --- /dev/null +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 1, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 1, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 1, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json new file mode 100644 index 00000000..ef580033 --- /dev/null +++ b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json @@ -0,0 +1,258 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "prop", + "identifiers": [ + { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": { + "type": "Literal", + "raw": "'foo'", + "value": "foo", + "range": [ + 28, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 21, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json new file mode 100644 index 00000000..14725437 --- /dev/null +++ b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json @@ -0,0 +1,159 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "prop", + "identifiers": [ + { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": null, + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json new file mode 100644 index 00000000..26001b22 --- /dev/null +++ b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json @@ -0,0 +1,240 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "prop", + "identifiers": [ + { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": null, + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json new file mode 100644 index 00000000..26001b22 --- /dev/null +++ b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json @@ -0,0 +1,240 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "prop", + "identifiers": [ + { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": null, + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "prop", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "prop", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json new file mode 100644 index 00000000..d60909e3 --- /dev/null +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json @@ -0,0 +1,488 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "objs", + "identifiers": [ + { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 22, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 21, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 36, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 36 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 42, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 37 + } + } + } + ], + "range": [ + 35, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + ], + "range": [ + 20, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + "range": [ + 13, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "objs", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json new file mode 100644 index 00000000..b6c16cf5 --- /dev/null +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json new file mode 100644 index 00000000..41a08566 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json @@ -0,0 +1,636 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"foo\"", + "value": "foo", + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 23, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "range": [ + 21, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 15, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "range": [ + 43, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "bar", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "range": [ + 43, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json new file mode 100644 index 00000000..61297f5f --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json @@ -0,0 +1,752 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 23, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"foo\"", + "value": "foo", + "range": [ + 29, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 23, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "range": [ + 21, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 15, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 51, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 45, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 45, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "range": [ + 43, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "bar", + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 43, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json new file mode 100644 index 00000000..2ba87d16 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json @@ -0,0 +1,674 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "\"foo\"", + "value": "foo", + "range": [ + 23, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "range": [ + 21, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 15, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 45, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "range": [ + 37, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "bar", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 37, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json new file mode 100644 index 00000000..7d5e035f --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json @@ -0,0 +1,575 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "\"foo\"", + "value": "foo", + "range": [ + 23, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "range": [ + 21, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 15, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 37, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "bar", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [ + 37, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json new file mode 100644 index 00000000..ccd58aa2 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json @@ -0,0 +1,611 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "\"foo\"", + "value": "foo", + "range": [ + 23, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "range": [ + 21, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 15, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ArrayPattern", + "elements": [ + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 37, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "bar", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 49, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 37, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 15, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 71, + 74 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 41, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json new file mode 100644 index 00000000..7b0e08a4 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json @@ -0,0 +1,1077 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 72, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 66, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 63, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "range": [ + 57, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "range": [ + 93, + 100 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "bar", + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "range": [ + 93, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 119, + 123 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ] + }, + { + "name": "baz", + "identifiers": [ + { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "$foo", + "range": [ + 119, + 123 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "range": [ + 113, + 123 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 137, + 140 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 103, + 106 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 119, + 123 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 137, + 140 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json new file mode 100644 index 00000000..a6953e56 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json @@ -0,0 +1,961 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 57, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 86, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "bar", + "range": [ + 86, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 80, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + } + ] + }, + { + "name": "baz", + "identifiers": [ + { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "$foo", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "range": [ + 95, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 64, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 18, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 86, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 57, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json new file mode 100644 index 00000000..a1187832 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json @@ -0,0 +1,2370 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 170, + 176 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 170, + 176 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 192, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 192, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 213, + 219 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 213, + 219 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 268, + 274 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 268, + 274 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "count2", + "identifiers": [ + { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "local": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$count2", + "range": [ + 139, + 146 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count2", + "range": [ + 295, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count2", + "range": [ + 295, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ] + }, + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 123, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 164, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 319, + 322 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 123, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 123, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 117, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 185, + 189 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 340, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 340, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ] + }, + { + "name": "baz", + "identifiers": [ + { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "$count", + "range": [ + 213, + 219 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "5", + "value": 5, + "range": [ + 222, + 223 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "range": [ + 213, + 223 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "range": [ + 207, + 223 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 361, + 364 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 123, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count2", + "range": [ + 139, + 146 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 164, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 170, + 176 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 185, + 189 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 192, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 213, + 219 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 268, + 274 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count2", + "range": [ + 295, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count2", + "range": [ + 26, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 319, + 322 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 340, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "baz", + "range": [ + 361, + 364 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "baz", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json new file mode 100644 index 00000000..0ce45b7b --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json @@ -0,0 +1,1476 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 66, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 60, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 107, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 91, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "range": [ + 85, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 114, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 167, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 167, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 246, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 246, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 107, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 114, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 145, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 167, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$foo", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 246, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$bar", + "range": [ + 246, + 250 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json new file mode 100644 index 00000000..416b0c2e --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json @@ -0,0 +1,330 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": null, + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 64, + 67 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 64, + 67 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json new file mode 100644 index 00000000..e856ab20 --- /dev/null +++ b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json @@ -0,0 +1,602 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "init": null, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 56, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 32, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json new file mode 100644 index 00000000..f687cfa0 --- /dev/null +++ b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json @@ -0,0 +1,568 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$name", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$name", + "range": [ + 141, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$name", + "range": [ + 141, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "greeting", + "identifiers": [ + { + "type": "Identifier", + "name": "greeting", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "greeting", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "greeting", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "local": { + "type": "Identifier", + "name": "greeting", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$greeting", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "greeting", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$greeting", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "greeting", + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$name", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$name", + "range": [ + 141, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$name", + "range": [ + 141, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json new file mode 100644 index 00000000..e4c88be2 --- /dev/null +++ b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json @@ -0,0 +1,313 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 22, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "literal", + "range": [ + 147, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 22, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "literal", + "range": [ + 147, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 22, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "variable", + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "literal", + "range": [ + 147, + 154 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json new file mode 100644 index 00000000..c6111112 --- /dev/null +++ b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json @@ -0,0 +1,298 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "color", + "identifiers": [ + { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "init": { + "type": "Literal", + "raw": "'red'", + "value": "red", + "range": [ + 27, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "color", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "color", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json new file mode 100644 index 00000000..df77d617 --- /dev/null +++ b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json @@ -0,0 +1,544 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "containerStyles", + "identifiers": [ + { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 42, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + "range": [ + 24, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 84, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 54 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ] + }, + { + "name": "containerStylesHtml", + "identifiers": [ + { + "type": "Identifier", + "name": "containerStylesHtml", + "range": [ + 52, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "containerStylesHtml", + "range": [ + 52, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "containerStylesHtml", + "range": [ + 52, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "operator": "=", + "right": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 84, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 54 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 54 + }, + "end": { + "line": 3, + "column": 64 + } + } + } + ], + "range": [ + 74, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 64 + } + } + }, + "range": [ + 52, + 109 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 64 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "containerStylesHtml", + "range": [ + 52, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "containerStylesHtml", + "range": [ + 52, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 84, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 54 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "containerStyles", + "range": [ + 24, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json new file mode 100644 index 00000000..dde610ce --- /dev/null +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json @@ -0,0 +1,613 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tag", + "identifiers": [ + { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "'div'", + "value": "div", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 16, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 89, + 92 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": null, + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 41, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tag", + "range": [ + 89, + 92 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tag", + "range": [ + 16, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 41, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 41, + 48 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json new file mode 100644 index 00000000..d7a9f934 --- /dev/null +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json @@ -0,0 +1,297 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 26, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json new file mode 100644 index 00000000..b728cf65 --- /dev/null +++ b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json @@ -0,0 +1,1144 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "component", + "identifiers": [ + { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "component", + "range": [ + 175, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "style", + "identifiers": [ + { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'red'", + "value": "red", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 57, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 55, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "range": [ + 47, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 202, + 207 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + }, + { + "name": "componentValue", + "identifiers": [ + { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "init": null, + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 222, + 236 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "metaData", + "identifiers": [ + { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handleChange", + "identifiers": [ + { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 136, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "params": [], + "range": [ + 112, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 255, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 202, + 207 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 222, + 236 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 255, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "component", + "range": [ + 175, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json new file mode 100644 index 00000000..d6e06927 --- /dev/null +++ b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json @@ -0,0 +1,1144 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "component", + "identifiers": [ + { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "component", + "range": [ + 227, + 236 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "style", + "identifiers": [ + { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'red'", + "value": "red", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 57, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 55, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "range": [ + 47, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 184, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + }, + { + "name": "componentValue", + "identifiers": [ + { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "init": null, + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 204, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "metaData", + "identifiers": [ + { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handleChange", + "identifiers": [ + { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 136, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "params": [], + "range": [ + 112, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 255, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 184, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 204, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 255, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 275, + 283 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "component", + "range": [ + 227, + 236 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json new file mode 100644 index 00000000..6507504a --- /dev/null +++ b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json @@ -0,0 +1,1144 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "component", + "identifiers": [ + { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "component", + "range": [ + 273, + 282 + ], + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "style", + "identifiers": [ + { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'red'", + "value": "red", + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 57, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 55, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "range": [ + 47, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 184, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + }, + { + "name": "componentValue", + "identifiers": [ + { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "init": null, + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 204, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "metaData", + "identifiers": [ + { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 257, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handleChange", + "identifiers": [ + { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 136, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "params": [], + "range": [ + 112, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 237, + 249 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 184, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 204, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "componentValue", + "range": [ + 77, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 237, + 249 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleChange", + "range": [ + 121, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "metaData", + "range": [ + 257, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "metaData", + "range": [ + 97, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "component", + "range": [ + 273, + 282 + ], + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "component", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json new file mode 100644 index 00000000..a7744f2c --- /dev/null +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json @@ -0,0 +1,484 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "init": { + "type": "Literal", + "raw": "/a/", + "regex": { + "flags": "", + "pattern": "a" + }, + "value": "/a/", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 15, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 7 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json new file mode 100644 index 00000000..88771ee2 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json @@ -0,0 +1,176 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 35, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 35, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 35, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json new file mode 100644 index 00000000..b6c5c412 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json new file mode 100644 index 00000000..b6c5c412 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json new file mode 100644 index 00000000..b6c5c412 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json new file mode 100644 index 00000000..b6c5c412 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json @@ -0,0 +1,106 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json new file mode 100644 index 00000000..4b25ba9f --- /dev/null +++ b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json @@ -0,0 +1,1495 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "str", + "identifiers": [ + { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "TSAsExpression", + "expression": { + "type": "Literal", + "raw": "'abc'", + "value": "abc", + "range": [ + 32, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "const", + "range": [ + 41, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 41, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 32, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 26, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "str", + "range": [ + 133, + 136 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "str", + "range": [ + 189, + 192 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "const", + "range": [ + 41, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "str", + "range": [ + 133, + 136 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "str", + "range": [ + 189, + 192 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "str", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 83, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 88, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 110, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "range": [ + 85, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "range": [ + 58, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "s", + "identifiers": [ + { + "type": "Identifier", + "name": "s", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "s", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "s", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 144, + 146 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 146, + 149 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The string is ", + "range": [ + 149, + 163 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "s", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "range": [ + 163, + 166 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 21 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 166, + 170 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "range": [ + 146, + 170 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 25 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + ], + "range": [ + 125, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "s", + "identifiers": [ + { + "type": "Identifier", + "name": "s", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "s", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "s", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 209, + 211 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 211, + 214 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The string is ", + "range": [ + 214, + 228 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "s", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "range": [ + 228, + 231 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 231, + 235 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "range": [ + 211, + 235 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 235, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 15, + "column": 0 + } + } + } + ], + "range": [ + 181, + 236 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "const", + "range": [ + 41, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json new file mode 100644 index 00000000..648672e7 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json @@ -0,0 +1,3807 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "list", + "identifiers": [ + { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [], + "range": [ + 46, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 29, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 115, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + } + ] + }, + { + "name": "items", + "identifiers": [ + { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [], + "range": [ + 95, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 48 + } + } + }, + "range": [ + 59, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 48 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "list", + "range": [ + 115, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "list", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSNumberKeyword", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 33, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + "range": [ + 29, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 83, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 82, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + "range": [ + 78, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 40 + } + } + } + ], + "range": [ + 66, + 90 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 41 + } + } + }, + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 64, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 59, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "list", + "range": [ + 115, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "e", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "e", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "range": [ + 130, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 7 + } + } + } + ], + "else": null, + "range": [ + 108, + 141 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 176, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 34 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "range": [ + 171, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "index", + "range": [ + 186, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "range": [ + 185, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 193, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 198, + 202 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 193, + 202 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 192, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 22 + } + } + } + ], + "else": null, + "range": [ + 142, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 193, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + } + ] + }, + { + "name": "index", + "identifiers": [ + { + "type": "Identifier", + "name": "index", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "index", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "items", + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "index": { + "type": "Identifier", + "name": "index", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 176, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 34 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "range": [ + 171, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "index", + "range": [ + 186, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "range": [ + 185, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 193, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 198, + 202 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 193, + 202 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 192, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 22 + } + } + } + ], + "else": null, + "range": [ + 142, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 10, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "index", + "range": [ + 186, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "index", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 171, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "index", + "range": [ + 186, + 191 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "index", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 193, + 197 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json new file mode 100644 index 00000000..3f372d59 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json @@ -0,0 +1,428 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Component", + "identifiers": [ + { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 106, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 90, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "range": [ + 87, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 130, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 127, + 132 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json new file mode 100644 index 00000000..6b6626a5 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json @@ -0,0 +1,428 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Component", + "identifiers": [ + { + "type": "Identifier", + "name": "Component", + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Component", + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 114, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 114, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 98, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "range": [ + 95, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 138, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 135, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json new file mode 100644 index 00000000..81e1dedf --- /dev/null +++ b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json @@ -0,0 +1,1215 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createEventDispatcher", + "identifiers": [ + { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "local": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 85, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + } + ] + }, + { + "name": "emit", + "identifiers": [ + { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 85, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 122, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 120, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 117, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 143, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 138, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "range": [ + 107, + 155 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 6, + "column": 5 + } + } + } + ], + "range": [ + 106, + 156 + ], + "loc": { + "start": { + "line": 3, + "column": 38 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "range": [ + 85, + 158 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "range": [ + 78, + 158 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emit", + "range": [ + 163, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 85, + 106 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 31, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emit", + "range": [ + 163, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emit", + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "currentTarget", + "range": [ + 219, + 232 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "range": [ + 217, + 232 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "range": [ + 217, + 233 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 20 + } + } + } + ], + "range": [ + 211, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + } + ], + "range": [ + 208, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 12, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "currentTarget", + "range": [ + 277, + 290 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 275, + 290 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "range": [ + 275, + 291 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 20 + } + } + } + ], + "range": [ + 269, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + ], + "range": [ + 266, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 15, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json new file mode 100644 index 00000000..aeef6d56 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json @@ -0,0 +1,304 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "currentTarget", + "range": [ + 62, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 60, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 60, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + ], + "range": [ + 54, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "range": [ + 51, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 6, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json new file mode 100644 index 00000000..260ec34f --- /dev/null +++ b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json @@ -0,0 +1,469 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Component", + "identifiers": [ + { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 86, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 86, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 349, + 355 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 347, + 355 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 347, + 356 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + ], + "range": [ + 108, + 358 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "range": [ + 105, + 358 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 11, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json new file mode 100644 index 00000000..6bf44ff7 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json @@ -0,0 +1,469 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Component", + "identifiers": [ + { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 86, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 86, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 140, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 140, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "range": [ + 108, + 151 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "range": [ + 105, + 151 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 8, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json new file mode 100644 index 00000000..26998ce8 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json @@ -0,0 +1,4947 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "EventInfo", + "identifiers": [ + { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Type", + "name": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "TSTypeAliasDeclaration", + "id": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "start_at", + "range": [ + 42, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 42, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "range": [ + 36, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + "range": [ + 19, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "info", + "identifiers": [ + { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "init": { + "type": "Literal", + "raw": "null", + "value": null, + "range": [ + 91, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + "range": [ + 66, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 248, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 49 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 323, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 12, + "column": 52 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ] + }, + { + "name": "lightFormat", + "identifiers": [ + { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "i", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toString", + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 44 + }, + "end": { + "line": 7, + "column": 52 + } + } + }, + "range": [ + 139, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 139, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 54 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "i", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "TSNumberKeyword", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 121, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 118, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 117, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 54 + } + } + }, + "range": [ + 103, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 265, + 276 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 340, + 351 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ] + }, + { + "name": "startDate", + "identifiers": [ + { + "type": "Identifier", + "name": "startDate", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "startDate", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "startDate", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "operator": "=", + "right": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "null", + "value": null, + "range": [ + 294, + 298 + ], + "loc": { + "start": { + "line": 11, + "column": 62 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "consequent": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "info", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "start_at", + "range": [ + 282, + 290 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 58 + } + } + }, + "range": [ + 277, + 290 + ], + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 58 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 265, + 276 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "optional": false, + "range": [ + 265, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 59 + } + } + }, + "test": { + "type": "ChainExpression", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "info", + "range": [ + 248, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + "optional": true, + "property": { + "type": "Identifier", + "name": "start_at", + "range": [ + 254, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 22 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 248, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 248, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 248, + 298 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "range": [ + 235, + 299 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 67 + } + } + } + } + ], + "references": [] + }, + { + "name": "endDate", + "identifiers": [ + { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "null", + "value": null, + "range": [ + 369, + 373 + ], + "loc": { + "start": { + "line": 12, + "column": 69 + }, + "end": { + "line": 12, + "column": 73 + } + } + }, + "consequent": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "info", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 12, + "column": 52 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "start_at", + "range": [ + 357, + 365 + ], + "loc": { + "start": { + "line": 12, + "column": 57 + }, + "end": { + "line": 12, + "column": 65 + } + } + }, + "range": [ + 352, + 365 + ], + "loc": { + "start": { + "line": 12, + "column": 52 + }, + "end": { + "line": 12, + "column": 65 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 340, + 351 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 51 + } + } + }, + "optional": false, + "range": [ + 340, + 366 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 66 + } + } + }, + "test": { + "type": "ChainExpression", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "info", + "range": [ + 323, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "optional": true, + "property": { + "type": "Identifier", + "name": "start_at", + "range": [ + 329, + 337 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 37 + } + } + }, + "range": [ + 323, + 337 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 37 + } + } + }, + "range": [ + 323, + 337 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 37 + } + } + }, + "range": [ + 323, + 373 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 316, + 374 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 74 + } + } + }, + "range": [ + 306, + 374 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 74 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 24, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 153, + 158 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 216, + 223 + ], + "loc": { + "start": { + "line": 9, + "column": 63 + }, + "end": { + "line": 9, + "column": 70 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "startDate", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "startDate", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 248, + 252 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 265, + 276 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 49 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "endDate", + "range": [ + 306, + 313 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "TSNumberKeyword", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 121, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 118, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "TSNumberKeyword", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 121, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 118, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "i", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toString", + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 44 + }, + "end": { + "line": 7, + "column": 52 + } + } + }, + "range": [ + 139, + 149 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 139, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 54 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "i", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "TSNumberKeyword", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 121, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 118, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 117, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "TSNumberKeyword", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 121, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 118, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 42 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "TSNumberKeyword", + "range": [ + 128, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + ], + "range": [ + 121, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 119, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 118, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 323, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 340, + 351 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 12, + "column": 52 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 323, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 23 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 340, + 351 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lightFormat", + "range": [ + 103, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "info", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 12, + "column": 52 + }, + "end": { + "line": 12, + "column": 56 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "info", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "EventInfo", + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 72, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 84, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 70, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 66, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Date", + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 153, + 158 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 216, + 223 + ], + "loc": { + "start": { + "line": 9, + "column": 63 + }, + "end": { + "line": 9, + "column": 70 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 153, + 158 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 216, + 223 + ], + "loc": { + "start": { + "line": 9, + "column": 63 + }, + "end": { + "line": 9, + "column": 70 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json new file mode 100644 index 00000000..85cf239b --- /dev/null +++ b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json @@ -0,0 +1,3439 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Component", + "identifiers": [ + { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 391, + 400 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 477, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "ListItem", + "identifiers": [ + { + "type": "Identifier", + "name": "ListItem", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "local": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ] + }, + { + "name": "items", + "identifiers": [ + { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "title", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"Svelte.dev\"", + "value": "Svelte.dev", + "range": [ + 133, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 126, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "link", + "range": [ + 153, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"https://svelte.dev\"", + "value": "https://svelte.dev", + "range": [ + 159, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 32 + } + } + }, + "range": [ + 153, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "range": [ + 118, + 186 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "title", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"TypeScript ESLint\"", + "value": "TypeScript ESLint", + "range": [ + 207, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + "range": [ + 200, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "link", + "range": [ + 234, + 238 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"https://typescript-eslint.io\"", + "value": "https://typescript-eslint.io", + "range": [ + 240, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 42 + } + } + }, + "range": [ + 234, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 42 + } + } + } + ], + "range": [ + 192, + 277 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "title", + "range": [ + 291, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"TypeScript\"", + "value": "TypeScript", + "range": [ + 298, + 310 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "range": [ + 291, + 310 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "link", + "range": [ + 318, + 322 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"https://www.typescriptlang.org\"", + "value": "https://www.typescriptlang.org", + "range": [ + 324, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "range": [ + 318, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 44 + } + } + } + ], + "range": [ + 283, + 363 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + } + ], + "range": [ + 112, + 368 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 92, + 368 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 17, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 488, + 493 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 391, + 400 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 488, + 493 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Component", + "range": [ + 477, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Component", + "range": [ + 28, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 413, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 413, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Component", + "range": [ + 391, + 400 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 12 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteShorthandAttribute", + "key": { + "type": "Identifier", + "name": "items", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "value": { + "type": "Identifier", + "name": "items", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "range": [ + 401, + 408 + ], + "loc": { + "start": { + "line": 21, + "column": 13 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 413, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "modifiers": [], + "range": [ + 409, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 413, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "range": [ + 409, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + ], + "selfClosing": false, + "range": [ + 390, + 418 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 30 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 418, + 423 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 424, + 427 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 423, + 428 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 428, + 435 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 436, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "title", + "range": [ + 441, + 446 + ], + "loc": { + "start": { + "line": 23, + "column": 12 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + "range": [ + 436, + 446 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + "range": [ + 435, + 447 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 18 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 447, + 452 + ], + "loc": { + "start": { + "line": 23, + "column": 18 + }, + "end": { + "line": 24, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 452, + 458 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + "range": [ + 423, + 458 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 458, + 461 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 25, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 461, + 473 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 14 + } + } + }, + "range": [ + 390, + 473 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 25, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 436, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 413, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 436, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 7 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 413, + 417 + ], + "loc": { + "start": { + "line": 21, + "column": 25 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSArrayType", + "elementType": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "ListItem", + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 97, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 92, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 509, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 509, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 501, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "item", + "range": [ + 509, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + "modifiers": [], + "range": [ + 505, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 509, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + } + }, + "range": [ + 505, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 500, + 514 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 514, + 521 + ], + "loc": { + "start": { + "line": 27, + "column": 18 + }, + "end": { + "line": 28, + "column": 6 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "item", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "title", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 17 + } + } + }, + "range": [ + 522, + 532 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 17 + } + } + }, + "range": [ + 521, + 533 + ], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 533, + 538 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 29, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 538, + 544 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 10 + } + } + }, + "range": [ + 500, + 544 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 29, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 509, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 509, + 513 + ], + "loc": { + "start": { + "line": 27, + "column": 13 + }, + "end": { + "line": 27, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 579, + 582 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 37 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 579, + 582 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 37 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 550, + 554 + ], + "loc": { + "start": { + "line": 30, + "column": 5 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "slot", + "range": [ + 555, + 559 + ], + "loc": { + "start": { + "line": 30, + "column": 10 + }, + "end": { + "line": 30, + "column": 14 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "count", + "range": [ + 561, + 566 + ], + "loc": { + "start": { + "line": 30, + "column": 16 + }, + "end": { + "line": 30, + "column": 21 + } + } + } + ], + "range": [ + 555, + 567 + ], + "loc": { + "start": { + "line": 30, + "column": 10 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "count", + "range": [ + 572, + 577 + ], + "loc": { + "start": { + "line": 30, + "column": 27 + }, + "end": { + "line": 30, + "column": 32 + } + } + }, + "modifiers": [], + "range": [ + 568, + 577 + ], + "loc": { + "start": { + "line": 30, + "column": 23 + }, + "end": { + "line": 30, + "column": 32 + } + } + }, + "expression": { + "type": "Identifier", + "name": "foo", + "range": [ + 579, + 582 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 37 + } + } + }, + "range": [ + 568, + 583 + ], + "loc": { + "start": { + "line": 30, + "column": 23 + }, + "end": { + "line": 30, + "column": 38 + } + } + } + ], + "selfClosing": false, + "range": [ + 549, + 584 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 39 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 584, + 591 + ], + "loc": { + "start": { + "line": 30, + "column": 39 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "foo", + "range": [ + 592, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 7 + }, + "end": { + "line": 31, + "column": 10 + } + } + }, + "range": [ + 591, + 596 + ], + "loc": { + "start": { + "line": 31, + "column": 6 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 596, + 601 + ], + "loc": { + "start": { + "line": 31, + "column": 11 + }, + "end": { + "line": 32, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 601, + 608 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 11 + } + } + }, + "range": [ + 549, + 608 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 32, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 592, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 7 + }, + "end": { + "line": 31, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 579, + 582 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 37 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 592, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 7 + }, + "end": { + "line": 31, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 579, + 582 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 37 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json new file mode 100644 index 00000000..f76efcb8 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json @@ -0,0 +1,1151 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "aWithNewline", + "identifiers": [ + { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 39, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + "range": [ + 22, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 3, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 154, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "bWithNewline", + "identifiers": [ + { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 63, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "range": [ + 46, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 5, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 168, + 180 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + }, + { + "name": "cWithNewline", + "identifiers": [ + { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 87, + 89 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + "range": [ + 69, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 182, + 194 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ] + }, + { + "name": "dWithNewline", + "identifiers": [ + { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 113, + 115 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "range": [ + 95, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 9, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 196, + 208 + ], + "loc": { + "start": { + "line": 14, + "column": 43 + }, + "end": { + "line": 14, + "column": 55 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + } + ] + }, + { + "name": "eWithNewline", + "identifiers": [ + { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 138, + 140 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "range": [ + 120, + 141 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 210, + 222 + ], + "loc": { + "start": { + "line": 14, + "column": 57 + }, + "end": { + "line": 14, + "column": 69 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 154, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "aWithNewline", + "range": [ + 22, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 3 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 168, + 180 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bWithNewline", + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 182, + 194 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cWithNewline", + "range": [ + 69, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 196, + 208 + ], + "loc": { + "start": { + "line": 14, + "column": 43 + }, + "end": { + "line": 14, + "column": 55 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dWithNewline", + "range": [ + 95, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 210, + 222 + ], + "loc": { + "start": { + "line": 14, + "column": 57 + }, + "end": { + "line": 14, + "column": 69 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eWithNewline", + "range": [ + 120, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json new file mode 100644 index 00000000..133d412f --- /dev/null +++ b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json @@ -0,0 +1,1816 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "num", + "identifiers": [ + { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 31, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 25, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 79, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "obj", + "identifiers": [ + { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [], + "range": [ + 63, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "range": [ + 40, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "obj", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "obj", + "range": [ + 94, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "obj", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 3 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 79, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "obj", + "range": [ + 94, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "obj", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": true, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "range": [ + 46, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "range": [ + 44, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 40, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json new file mode 100644 index 00000000..5c2dda73 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json @@ -0,0 +1,3121 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "promise", + "identifiers": [ + { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 2, + "column": 67 + }, + "end": { + "line": 2, + "column": 68 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 88, + 90 + ], + "loc": { + "start": { + "line": 2, + "column": 69 + }, + "end": { + "line": 2, + "column": 71 + } + } + }, + "range": [ + 86, + 90 + ], + "loc": { + "start": { + "line": 2, + "column": 67 + }, + "end": { + "line": 2, + "column": 71 + } + } + } + ], + "range": [ + 85, + 91 + ], + "loc": { + "start": { + "line": 2, + "column": 66 + }, + "end": { + "line": 2, + "column": 72 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "resolve", + "range": [ + 77, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 58 + }, + "end": { + "line": 2, + "column": 65 + } + } + }, + "optional": false, + "range": [ + 77, + 92 + ], + "loc": { + "start": { + "line": 2, + "column": 58 + }, + "end": { + "line": 2, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + ], + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 2, + "column": 47 + }, + "end": { + "line": 2, + "column": 73 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Promise", + "range": [ + 58, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 54, + 93 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 74 + } + } + }, + "range": [ + 24, + 93 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 74 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 114, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 58, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 114, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "range": [ + 40, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 39, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 31, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 24, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "resolve", + "identifiers": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "resolve", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 55 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 2, + "column": 67 + }, + "end": { + "line": 2, + "column": 68 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 88, + 90 + ], + "loc": { + "start": { + "line": 2, + "column": 69 + }, + "end": { + "line": 2, + "column": 71 + } + } + }, + "range": [ + 86, + 90 + ], + "loc": { + "start": { + "line": 2, + "column": 67 + }, + "end": { + "line": 2, + "column": 71 + } + } + } + ], + "range": [ + 85, + 91 + ], + "loc": { + "start": { + "line": 2, + "column": 66 + }, + "end": { + "line": 2, + "column": 72 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "resolve", + "range": [ + 77, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 58 + }, + "end": { + "line": 2, + "column": 65 + } + } + }, + "optional": false, + "range": [ + 77, + 92 + ], + "loc": { + "start": { + "line": 2, + "column": 58 + }, + "end": { + "line": 2, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "resolve", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + ], + "range": [ + 66, + 92 + ], + "loc": { + "start": { + "line": 2, + "column": 47 + }, + "end": { + "line": 2, + "column": 73 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "resolve", + "range": [ + 77, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 58 + }, + "end": { + "line": 2, + "column": 65 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "resolve", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "resolve", + "range": [ + 77, + 84 + ], + "loc": { + "start": { + "line": 2, + "column": 58 + }, + "end": { + "line": 2, + "column": 65 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "resolve", + "range": [ + 67, + 74 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 156, + 158 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 161, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "number", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "a", + "range": [ + 183, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "range": [ + 176, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "range": [ + 175, + 185 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 28 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 185, + 189 + ], + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + "range": [ + 158, + 189 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 9, + "column": 0 + } + } + } + ], + "range": [ + 142, + 190 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 149, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 198, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 198, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 198, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 204, + 206 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 207, + 208 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 209, + 214 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 216, + 226 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 21 + } + } + } + ], + "range": [ + 209, + 227 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 206, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 37 + } + } + }, + "range": [ + 229, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 37 + } + } + }, + "range": [ + 228, + 243 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 38 + }, + "end": { + "line": 10, + "column": 42 + } + } + }, + "range": [ + 206, + 247 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 10, + "column": 42 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + ], + "range": [ + 190, + 248 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 198, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 198, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 58, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 58, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json new file mode 100644 index 00000000..5c38953b --- /dev/null +++ b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json @@ -0,0 +1,6704 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 38, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 200, + 207 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 503, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 658, + 665 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 819, + 826 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 980, + 987 + ], + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 1141, + 1148 + ], + "loc": { + "start": { + "line": 59, + "column": 8 + }, + "end": { + "line": 59, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 84, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 84, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 84, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 91, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 93, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 96, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 110, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 93, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 8, + "column": 0 + } + } + } + ], + "range": [ + 77, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 84, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 84, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 131, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 131, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 131, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 137, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 142, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 149, + 159 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 21 + } + } + } + ], + "range": [ + 142, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 139, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 162, + 167 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 168, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 37 + } + } + }, + "range": [ + 162, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 37 + } + } + }, + "range": [ + 161, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 176, + 180 + ], + "loc": { + "start": { + "line": 9, + "column": 38 + }, + "end": { + "line": 9, + "column": 42 + } + } + }, + "range": [ + 139, + 180 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 10, + "column": 0 + } + } + } + ], + "range": [ + 123, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 10, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 162, + 167 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 131, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 162, + 167 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 131, + 136 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 229, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "s", + "identifiers": [ + { + "type": "Identifier", + "name": "s", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "s", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "s", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 283, + 286 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 286, + 289 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The string is ", + "range": [ + 289, + 303 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "s", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 303, + 306 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 22 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 306, + 310 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, + "range": [ + 286, + 310 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 310, + 312 + ], + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 18, + "column": 1 + } + } + } + ], + "range": [ + 274, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 18, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 320, + 325 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 320, + 325 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 320, + 325 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 326, + 329 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 332, + 337 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 339, + 349 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 22 + } + } + } + ], + "range": [ + 332, + 350 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 23 + } + } + } + ], + "selfClosing": false, + "range": [ + 329, + 351 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 352, + 357 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 358, + 365 + ], + "loc": { + "start": { + "line": 19, + "column": 31 + }, + "end": { + "line": 19, + "column": 38 + } + } + }, + "range": [ + 352, + 365 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 38 + } + } + }, + "range": [ + 351, + 366 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 39 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 19, + "column": 39 + }, + "end": { + "line": 19, + "column": 43 + } + } + }, + "range": [ + 329, + 370 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 43 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 370, + 372 + ], + "loc": { + "start": { + "line": 19, + "column": 43 + }, + "end": { + "line": 20, + "column": 1 + } + } + } + ], + "range": [ + 312, + 372 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 20, + "column": 1 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 352, + 357 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 320, + 325 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 352, + 357 + ], + "loc": { + "start": { + "line": 19, + "column": 25 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 320, + 325 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 229, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 388, + 394 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 388, + 394 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 388, + 394 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 395, + 397 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 398, + 399 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 397, + 400 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 400, + 414 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 415, + 421 + ], + "loc": { + "start": { + "line": 22, + "column": 19 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [ + 414, + 422 + ], + "loc": { + "start": { + "line": 22, + "column": 18 + }, + "end": { + "line": 22, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 422, + 426 + ], + "loc": { + "start": { + "line": 22, + "column": 26 + }, + "end": { + "line": 22, + "column": 30 + } + } + }, + "range": [ + 397, + 426 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 426, + 427 + ], + "loc": { + "start": { + "line": 22, + "column": 30 + }, + "end": { + "line": 23, + "column": 0 + } + } + } + ], + "range": [ + 381, + 427 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 415, + 421 + ], + "loc": { + "start": { + "line": 22, + "column": 19 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 388, + 394 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 415, + 421 + ], + "loc": { + "start": { + "line": 22, + "column": 19 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 388, + 394 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 441, + 443 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 453, + 463 + ], + "loc": { + "start": { + "line": 24, + "column": 11 + }, + "end": { + "line": 24, + "column": 21 + } + } + } + ], + "range": [ + 446, + 464 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 443, + 465 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 466, + 471 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 472, + 479 + ], + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 37 + } + } + }, + "range": [ + 466, + 479 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 37 + } + } + }, + "range": [ + 465, + 480 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 480, + 484 + ], + "loc": { + "start": { + "line": 24, + "column": 38 + }, + "end": { + "line": 24, + "column": 42 + } + } + }, + "range": [ + 443, + 484 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 42 + }, + "end": { + "line": 25, + "column": 0 + } + } + } + ], + "range": [ + 427, + 485 + ], + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 466, + 471 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 466, + 471 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 8 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 554, + 556 + ], + "loc": { + "start": { + "line": 29, + "column": 9 + }, + "end": { + "line": 30, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 556, + 559 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The boolean is ", + "range": [ + 559, + 574 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "b", + "range": [ + 575, + 576 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 21 + } + } + }, + "range": [ + 574, + 577 + ], + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 22 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 577, + 581 + ], + "loc": { + "start": { + "line": 30, + "column": 22 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + "range": [ + 556, + 581 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 581, + 582 + ], + "loc": { + "start": { + "line": 30, + "column": 26 + }, + "end": { + "line": 31, + "column": 0 + } + } + } + ], + "range": [ + 545, + 582 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 575, + 576 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 575, + 576 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 590, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 590, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 590, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 596, + 598 + ], + "loc": { + "start": { + "line": 31, + "column": 14 + }, + "end": { + "line": 32, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 599, + 600 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 601, + 606 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 608, + 618 + ], + "loc": { + "start": { + "line": 32, + "column": 11 + }, + "end": { + "line": 32, + "column": 21 + } + } + } + ], + "range": [ + 601, + 619 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 598, + 620 + ], + "loc": { + "start": { + "line": 32, + "column": 1 + }, + "end": { + "line": 32, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 621, + 626 + ], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 627, + 634 + ], + "loc": { + "start": { + "line": 32, + "column": 30 + }, + "end": { + "line": 32, + "column": 37 + } + } + }, + "range": [ + 621, + 634 + ], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 37 + } + } + }, + "range": [ + 620, + 635 + ], + "loc": { + "start": { + "line": 32, + "column": 23 + }, + "end": { + "line": 32, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 635, + 639 + ], + "loc": { + "start": { + "line": 32, + "column": 38 + }, + "end": { + "line": 32, + "column": 42 + } + } + }, + "range": [ + 598, + 639 + ], + "loc": { + "start": { + "line": 32, + "column": 1 + }, + "end": { + "line": 32, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 639, + 640 + ], + "loc": { + "start": { + "line": 32, + "column": 42 + }, + "end": { + "line": 33, + "column": 0 + } + } + } + ], + "range": [ + 582, + 640 + ], + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 33, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 621, + 626 + ], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 590, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 621, + 626 + ], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 590, + 595 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 704, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 704, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 704, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 711, + 713 + ], + "loc": { + "start": { + "line": 37, + "column": 14 + }, + "end": { + "line": 38, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 714, + 715 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 713, + 716 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 716, + 730 + ], + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 731, + 737 + ], + "loc": { + "start": { + "line": 38, + "column": 19 + }, + "end": { + "line": 38, + "column": 25 + } + } + }, + "range": [ + 730, + 738 + ], + "loc": { + "start": { + "line": 38, + "column": 18 + }, + "end": { + "line": 38, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 738, + 742 + ], + "loc": { + "start": { + "line": 38, + "column": 26 + }, + "end": { + "line": 38, + "column": 30 + } + } + }, + "range": [ + 713, + 742 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 742, + 743 + ], + "loc": { + "start": { + "line": 38, + "column": 30 + }, + "end": { + "line": 39, + "column": 0 + } + } + } + ], + "range": [ + 697, + 743 + ], + "loc": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 39, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 731, + 737 + ], + "loc": { + "start": { + "line": 38, + "column": 19 + }, + "end": { + "line": 38, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 704, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 731, + 737 + ], + "loc": { + "start": { + "line": 38, + "column": 19 + }, + "end": { + "line": 38, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 704, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 751, + 756 + ], + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 751, + 756 + ], + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 751, + 756 + ], + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 757, + 759 + ], + "loc": { + "start": { + "line": 39, + "column": 14 + }, + "end": { + "line": 40, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 760, + 761 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 762, + 767 + ], + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 769, + 779 + ], + "loc": { + "start": { + "line": 40, + "column": 11 + }, + "end": { + "line": 40, + "column": 21 + } + } + } + ], + "range": [ + 762, + 780 + ], + "loc": { + "start": { + "line": 40, + "column": 4 + }, + "end": { + "line": 40, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 759, + 781 + ], + "loc": { + "start": { + "line": 40, + "column": 1 + }, + "end": { + "line": 40, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 782, + 787 + ], + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 788, + 795 + ], + "loc": { + "start": { + "line": 40, + "column": 30 + }, + "end": { + "line": 40, + "column": 37 + } + } + }, + "range": [ + 782, + 795 + ], + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 37 + } + } + }, + "range": [ + 781, + 796 + ], + "loc": { + "start": { + "line": 40, + "column": 23 + }, + "end": { + "line": 40, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 796, + 800 + ], + "loc": { + "start": { + "line": 40, + "column": 38 + }, + "end": { + "line": 40, + "column": 42 + } + } + }, + "range": [ + 759, + 800 + ], + "loc": { + "start": { + "line": 40, + "column": 1 + }, + "end": { + "line": 40, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 800, + 801 + ], + "loc": { + "start": { + "line": 40, + "column": 42 + }, + "end": { + "line": 41, + "column": 0 + } + } + } + ], + "range": [ + 743, + 801 + ], + "loc": { + "start": { + "line": 39, + "column": 0 + }, + "end": { + "line": 41, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 782, + 787 + ], + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 751, + 756 + ], + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 782, + 787 + ], + "loc": { + "start": { + "line": 40, + "column": 24 + }, + "end": { + "line": 40, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 751, + 756 + ], + "loc": { + "start": { + "line": 39, + "column": 8 + }, + "end": { + "line": 39, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 865, + 871 + ], + "loc": { + "start": { + "line": 45, + "column": 7 + }, + "end": { + "line": 45, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 865, + 871 + ], + "loc": { + "start": { + "line": 45, + "column": 7 + }, + "end": { + "line": 45, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 865, + 871 + ], + "loc": { + "start": { + "line": 45, + "column": 7 + }, + "end": { + "line": 45, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 872, + 874 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 46, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 875, + 876 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 874, + 877 + ], + "loc": { + "start": { + "line": 46, + "column": 1 + }, + "end": { + "line": 46, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 877, + 891 + ], + "loc": { + "start": { + "line": 46, + "column": 4 + }, + "end": { + "line": 46, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 892, + 898 + ], + "loc": { + "start": { + "line": 46, + "column": 19 + }, + "end": { + "line": 46, + "column": 25 + } + } + }, + "range": [ + 891, + 899 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 899, + 903 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "range": [ + 874, + 903 + ], + "loc": { + "start": { + "line": 46, + "column": 1 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 903, + 904 + ], + "loc": { + "start": { + "line": 46, + "column": 30 + }, + "end": { + "line": 47, + "column": 0 + } + } + } + ], + "range": [ + 858, + 904 + ], + "loc": { + "start": { + "line": 45, + "column": 0 + }, + "end": { + "line": 47, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 892, + 898 + ], + "loc": { + "start": { + "line": 46, + "column": 19 + }, + "end": { + "line": 46, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 865, + 871 + ], + "loc": { + "start": { + "line": 45, + "column": 7 + }, + "end": { + "line": 45, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 892, + 898 + ], + "loc": { + "start": { + "line": 46, + "column": 19 + }, + "end": { + "line": 46, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 865, + 871 + ], + "loc": { + "start": { + "line": 45, + "column": 7 + }, + "end": { + "line": 45, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 912, + 917 + ], + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 912, + 917 + ], + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 912, + 917 + ], + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 918, + 920 + ], + "loc": { + "start": { + "line": 47, + "column": 14 + }, + "end": { + "line": 48, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 921, + 922 + ], + "loc": { + "start": { + "line": 48, + "column": 2 + }, + "end": { + "line": 48, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 923, + 928 + ], + "loc": { + "start": { + "line": 48, + "column": 4 + }, + "end": { + "line": 48, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 930, + 940 + ], + "loc": { + "start": { + "line": 48, + "column": 11 + }, + "end": { + "line": 48, + "column": 21 + } + } + } + ], + "range": [ + 923, + 941 + ], + "loc": { + "start": { + "line": 48, + "column": 4 + }, + "end": { + "line": 48, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 920, + 942 + ], + "loc": { + "start": { + "line": 48, + "column": 1 + }, + "end": { + "line": 48, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 943, + 948 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 949, + 956 + ], + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 37 + } + } + }, + "range": [ + 943, + 956 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 37 + } + } + }, + "range": [ + 942, + 957 + ], + "loc": { + "start": { + "line": 48, + "column": 23 + }, + "end": { + "line": 48, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 957, + 961 + ], + "loc": { + "start": { + "line": 48, + "column": 38 + }, + "end": { + "line": 48, + "column": 42 + } + } + }, + "range": [ + 920, + 961 + ], + "loc": { + "start": { + "line": 48, + "column": 1 + }, + "end": { + "line": 48, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 961, + 962 + ], + "loc": { + "start": { + "line": 48, + "column": 42 + }, + "end": { + "line": 49, + "column": 0 + } + } + } + ], + "range": [ + 904, + 962 + ], + "loc": { + "start": { + "line": 47, + "column": 0 + }, + "end": { + "line": 49, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 943, + 948 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 912, + 917 + ], + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 943, + 948 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 912, + 917 + ], + "loc": { + "start": { + "line": 47, + "column": 8 + }, + "end": { + "line": 47, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 1026, + 1032 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 1026, + 1032 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 1026, + 1032 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 1033, + 1035 + ], + "loc": { + "start": { + "line": 53, + "column": 14 + }, + "end": { + "line": 54, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 1036, + 1037 + ], + "loc": { + "start": { + "line": 54, + "column": 2 + }, + "end": { + "line": 54, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 1035, + 1038 + ], + "loc": { + "start": { + "line": 54, + "column": 1 + }, + "end": { + "line": 54, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 1038, + 1052 + ], + "loc": { + "start": { + "line": 54, + "column": 4 + }, + "end": { + "line": 54, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 1053, + 1059 + ], + "loc": { + "start": { + "line": 54, + "column": 19 + }, + "end": { + "line": 54, + "column": 25 + } + } + }, + "range": [ + 1052, + 1060 + ], + "loc": { + "start": { + "line": 54, + "column": 18 + }, + "end": { + "line": 54, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1060, + 1064 + ], + "loc": { + "start": { + "line": 54, + "column": 26 + }, + "end": { + "line": 54, + "column": 30 + } + } + }, + "range": [ + 1035, + 1064 + ], + "loc": { + "start": { + "line": 54, + "column": 1 + }, + "end": { + "line": 54, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 1064, + 1065 + ], + "loc": { + "start": { + "line": 54, + "column": 30 + }, + "end": { + "line": 55, + "column": 0 + } + } + } + ], + "range": [ + 1019, + 1065 + ], + "loc": { + "start": { + "line": 53, + "column": 0 + }, + "end": { + "line": 55, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 1053, + 1059 + ], + "loc": { + "start": { + "line": 54, + "column": 19 + }, + "end": { + "line": 54, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 1026, + 1032 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 1053, + 1059 + ], + "loc": { + "start": { + "line": 54, + "column": 19 + }, + "end": { + "line": 54, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 1026, + 1032 + ], + "loc": { + "start": { + "line": 53, + "column": 7 + }, + "end": { + "line": 53, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 1073, + 1078 + ], + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 1073, + 1078 + ], + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 1073, + 1078 + ], + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 1079, + 1081 + ], + "loc": { + "start": { + "line": 55, + "column": 14 + }, + "end": { + "line": 56, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 1082, + 1083 + ], + "loc": { + "start": { + "line": 56, + "column": 2 + }, + "end": { + "line": 56, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 1084, + 1089 + ], + "loc": { + "start": { + "line": 56, + "column": 4 + }, + "end": { + "line": 56, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 1091, + 1101 + ], + "loc": { + "start": { + "line": 56, + "column": 11 + }, + "end": { + "line": 56, + "column": 21 + } + } + } + ], + "range": [ + 1084, + 1102 + ], + "loc": { + "start": { + "line": 56, + "column": 4 + }, + "end": { + "line": 56, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 1081, + 1103 + ], + "loc": { + "start": { + "line": 56, + "column": 1 + }, + "end": { + "line": 56, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 1104, + 1109 + ], + "loc": { + "start": { + "line": 56, + "column": 24 + }, + "end": { + "line": 56, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 1110, + 1117 + ], + "loc": { + "start": { + "line": 56, + "column": 30 + }, + "end": { + "line": 56, + "column": 37 + } + } + }, + "range": [ + 1104, + 1117 + ], + "loc": { + "start": { + "line": 56, + "column": 24 + }, + "end": { + "line": 56, + "column": 37 + } + } + }, + "range": [ + 1103, + 1118 + ], + "loc": { + "start": { + "line": 56, + "column": 23 + }, + "end": { + "line": 56, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 56, + "column": 38 + }, + "end": { + "line": 56, + "column": 42 + } + } + }, + "range": [ + 1081, + 1122 + ], + "loc": { + "start": { + "line": 56, + "column": 1 + }, + "end": { + "line": 56, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 1122, + 1123 + ], + "loc": { + "start": { + "line": 56, + "column": 42 + }, + "end": { + "line": 57, + "column": 0 + } + } + } + ], + "range": [ + 1065, + 1123 + ], + "loc": { + "start": { + "line": 55, + "column": 0 + }, + "end": { + "line": 57, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 1104, + 1109 + ], + "loc": { + "start": { + "line": 56, + "column": 24 + }, + "end": { + "line": 56, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 1073, + 1078 + ], + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 1104, + 1109 + ], + "loc": { + "start": { + "line": 56, + "column": 24 + }, + "end": { + "line": 56, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 1073, + 1078 + ], + "loc": { + "start": { + "line": 55, + "column": 8 + }, + "end": { + "line": 55, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 1187, + 1193 + ], + "loc": { + "start": { + "line": 61, + "column": 7 + }, + "end": { + "line": 61, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 1187, + 1193 + ], + "loc": { + "start": { + "line": 61, + "column": 7 + }, + "end": { + "line": 61, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 1187, + 1193 + ], + "loc": { + "start": { + "line": 61, + "column": 7 + }, + "end": { + "line": 61, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 1194, + 1196 + ], + "loc": { + "start": { + "line": 61, + "column": 14 + }, + "end": { + "line": 62, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 1197, + 1198 + ], + "loc": { + "start": { + "line": 62, + "column": 2 + }, + "end": { + "line": 62, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 1196, + 1199 + ], + "loc": { + "start": { + "line": 62, + "column": 1 + }, + "end": { + "line": 62, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 1199, + 1213 + ], + "loc": { + "start": { + "line": 62, + "column": 4 + }, + "end": { + "line": 62, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 1214, + 1220 + ], + "loc": { + "start": { + "line": 62, + "column": 19 + }, + "end": { + "line": 62, + "column": 25 + } + } + }, + "range": [ + 1213, + 1221 + ], + "loc": { + "start": { + "line": 62, + "column": 18 + }, + "end": { + "line": 62, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1221, + 1225 + ], + "loc": { + "start": { + "line": 62, + "column": 26 + }, + "end": { + "line": 62, + "column": 30 + } + } + }, + "range": [ + 1196, + 1225 + ], + "loc": { + "start": { + "line": 62, + "column": 1 + }, + "end": { + "line": 62, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 1225, + 1226 + ], + "loc": { + "start": { + "line": 62, + "column": 30 + }, + "end": { + "line": 63, + "column": 0 + } + } + } + ], + "range": [ + 1180, + 1226 + ], + "loc": { + "start": { + "line": 61, + "column": 0 + }, + "end": { + "line": 63, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 1214, + 1220 + ], + "loc": { + "start": { + "line": 62, + "column": 19 + }, + "end": { + "line": 62, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 1187, + 1193 + ], + "loc": { + "start": { + "line": 61, + "column": 7 + }, + "end": { + "line": 61, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 1214, + 1220 + ], + "loc": { + "start": { + "line": 62, + "column": 19 + }, + "end": { + "line": 62, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 1187, + 1193 + ], + "loc": { + "start": { + "line": 61, + "column": 7 + }, + "end": { + "line": 61, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 1234, + 1239 + ], + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 1234, + 1239 + ], + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 1234, + 1239 + ], + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 1240, + 1242 + ], + "loc": { + "start": { + "line": 63, + "column": 14 + }, + "end": { + "line": 64, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 1243, + 1244 + ], + "loc": { + "start": { + "line": 64, + "column": 2 + }, + "end": { + "line": 64, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 1245, + 1250 + ], + "loc": { + "start": { + "line": 64, + "column": 4 + }, + "end": { + "line": 64, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 1252, + 1262 + ], + "loc": { + "start": { + "line": 64, + "column": 11 + }, + "end": { + "line": 64, + "column": 21 + } + } + } + ], + "range": [ + 1245, + 1263 + ], + "loc": { + "start": { + "line": 64, + "column": 4 + }, + "end": { + "line": 64, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 1242, + 1264 + ], + "loc": { + "start": { + "line": 64, + "column": 1 + }, + "end": { + "line": 64, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 1265, + 1270 + ], + "loc": { + "start": { + "line": 64, + "column": 24 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 1271, + 1278 + ], + "loc": { + "start": { + "line": 64, + "column": 30 + }, + "end": { + "line": 64, + "column": 37 + } + } + }, + "range": [ + 1265, + 1278 + ], + "loc": { + "start": { + "line": 64, + "column": 24 + }, + "end": { + "line": 64, + "column": 37 + } + } + }, + "range": [ + 1264, + 1279 + ], + "loc": { + "start": { + "line": 64, + "column": 23 + }, + "end": { + "line": 64, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1279, + 1283 + ], + "loc": { + "start": { + "line": 64, + "column": 38 + }, + "end": { + "line": 64, + "column": 42 + } + } + }, + "range": [ + 1242, + 1283 + ], + "loc": { + "start": { + "line": 64, + "column": 1 + }, + "end": { + "line": 64, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 1283, + 1284 + ], + "loc": { + "start": { + "line": 64, + "column": 42 + }, + "end": { + "line": 65, + "column": 0 + } + } + } + ], + "range": [ + 1226, + 1284 + ], + "loc": { + "start": { + "line": 63, + "column": 0 + }, + "end": { + "line": 65, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 1265, + 1270 + ], + "loc": { + "start": { + "line": 64, + "column": 24 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 1234, + 1239 + ], + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 1265, + 1270 + ], + "loc": { + "start": { + "line": 64, + "column": 24 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 1234, + 1239 + ], + "loc": { + "start": { + "line": 63, + "column": 8 + }, + "end": { + "line": 63, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 38, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 200, + 207 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 229, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 503, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 658, + 665 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 819, + 826 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 980, + 987 + ], + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 1141, + 1148 + ], + "loc": { + "start": { + "line": 59, + "column": 8 + }, + "end": { + "line": 59, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 38, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 200, + 207 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 229, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 503, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 658, + 665 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 819, + 826 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 980, + 987 + ], + "loc": { + "start": { + "line": 51, + "column": 8 + }, + "end": { + "line": 51, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Promise", + "range": [ + 1141, + 1148 + ], + "loc": { + "start": { + "line": 59, + "column": 8 + }, + "end": { + "line": 59, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json new file mode 100644 index 00000000..6c8b5589 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json @@ -0,0 +1,1336 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "\"hello\"", + "value": "hello", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 27, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "get", + "identifiers": [ + { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "\"hello\"", + "value": "hello", + "range": [ + 59, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "range": [ + 49, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 115, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + }, + { + "name": "y", + "identifiers": [ + { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "name": "z", + "identifiers": [ + { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "z", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ] + }, + { + "name": "getFunction", + "identifiers": [ + { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "get", + "range": [ + 115, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 101, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 164, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 115, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 49, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "z", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "z", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 164, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getFunction", + "range": [ + 101, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json new file mode 100644 index 00000000..2c0d503f --- /dev/null +++ b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json @@ -0,0 +1,2358 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 165, + 173 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 188, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "\"hello\"", + "value": "hello", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 69, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + }, + { + "name": "get", + "identifiers": [ + { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Literal", + "raw": "\"hello\"", + "value": "hello", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 97, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 91, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 149, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + }, + { + "name": "y", + "identifiers": [ + { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 117, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ] + }, + { + "name": "z", + "identifiers": [ + { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 130, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "z", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ] + }, + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "get", + "range": [ + 149, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "range": [ + 143, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 165, + 173 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 165, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + "range": [ + 161, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 257, + 259 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 188, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 188, + 199 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 22 + } + } + }, + "range": [ + 184, + 199 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 266, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "get", + "range": [ + 149, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "get", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 165, + 173 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 188, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "z", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "z", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 257, + 259 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 266, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json new file mode 100644 index 00000000..d0233285 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json @@ -0,0 +1,1128 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "s", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "\"hello\"", + "value": "hello", + "range": [ + 42, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 39, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "n", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 54, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 51, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 37 + } + } + } + ], + "range": [ + 38, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "range": [ + 34, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "s", + "identifiers": [ + { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "range": [ + 67, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "name": "n", + "identifiers": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "range": [ + 67, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [ + 67, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "s", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "s", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json new file mode 100644 index 00000000..08efafb6 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json @@ -0,0 +1,1082 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "xx", + "identifiers": [ + { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "\"hello\"", + "value": "hello", + "range": [ + 34, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 29, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "xx", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "xx", + "range": [ + 89, + 91 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "yy", + "identifiers": [ + { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "init": null, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "yy", + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yy", + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ] + }, + { + "name": "zz", + "identifiers": [ + { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "xx", + "range": [ + 89, + 91 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "zz", + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yy", + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "xx", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "xx", + "range": [ + 89, + 91 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "xx", + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yy", + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yy", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "zz", + "range": [ + 109, + 111 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zz", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json new file mode 100644 index 00000000..5868c3d3 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json @@ -0,0 +1,1742 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 140, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 76, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 72, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 170, + 172 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 170, + 172 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + }, + { + "name": "aValue", + "identifiers": [ + { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "$a", + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 95, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "aValue", + "range": [ + 175, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "bValue", + "identifiers": [ + { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "$b", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 114, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bValue", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "\"b\"", + "value": "b", + "range": [ + 149, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 140, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 140, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + "range": [ + 136, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 188, + 190 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 188, + 190 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 104, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 140, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 170, + 172 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "aValue", + "range": [ + 175, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "aValue", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 188, + 190 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bValue", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bValue", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json new file mode 100644 index 00000000..10e688c5 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json @@ -0,0 +1,4918 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "init": { + "type": "Literal", + "raw": "null", + "value": null, + "range": [ + 61, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 31, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 87, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 111, + 114 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 178, + 181 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "init": null, + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + } + ] + }, + { + "name": "r", + "identifiers": [ + { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "operator": "=", + "right": { + "type": "LogicalExpression", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "operator": "&&", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "foo", + "range": [ + 111, + 114 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "bar", + "range": [ + 115, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + "range": [ + 111, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + "range": [ + 104, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + "range": [ + 100, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + } + ] + }, + { + "name": "n", + "identifiers": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 127, + 130 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 127, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + ], + "range": [ + 125, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "operator": "=", + "right": { + "type": "LogicalExpression", + "left": { + "type": "Identifier", + "name": "foo", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "operator": "||", + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 147, + 150 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "range": [ + 147, + 154 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 33 + } + } + } + ], + "range": [ + 145, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "range": [ + 138, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "range": [ + 125, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 192, + 193 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 80, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 87, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 104, + 107 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 111, + 114 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 178, + 181 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "foo", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "bar", + "range": [ + 38, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 43, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 41, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + "range": [ + 38, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 29 + } + } + } + ], + "range": [ + 36, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "range": [ + 36, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 34, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 31, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 4 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 192, + 193 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json new file mode 100644 index 00000000..82916d7b --- /dev/null +++ b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json @@ -0,0 +1,1362 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Pagination", + "identifiers": [ + { + "type": "Identifier", + "name": "Pagination", + "range": [ + 100, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Pagination", + "range": [ + 100, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Pagination", + "range": [ + 100, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 100, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Pagination", + "range": [ + 293, + 303 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Pagination", + "range": [ + 100, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + } + ] + }, + { + "name": "page", + "identifiers": [ + { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 156, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "page", + "range": [ + 212, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "page", + "range": [ + 318, + 322 + ], + "loc": { + "start": { + "line": 14, + "column": 26 + }, + "end": { + "line": 14, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "name": "perPage", + "identifiers": [ + { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "init": { + "type": "Literal", + "raw": "15", + "value": 15, + "range": [ + 182, + 184 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 172, + 184 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "perPage", + "range": [ + 201, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + }, + { + "name": "pageStart", + "identifiers": [ + { + "type": "Identifier", + "name": "pageStart", + "range": [ + 189, + 198 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "pageStart", + "range": [ + 189, + 198 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "pageStart", + "range": [ + 189, + 198 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "perPage", + "range": [ + 201, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "page", + "range": [ + 212, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 219, + 220 + ], + "loc": { + "start": { + "line": 7, + "column": 33 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "range": [ + 212, + 220 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "range": [ + 201, + 221 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + "range": [ + 189, + 221 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 35 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pageStart", + "range": [ + 189, + 198 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pageStart", + "range": [ + 189, + 198 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "perPage", + "range": [ + 201, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "perPage", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "page", + "range": [ + 212, + 216 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "array", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "page", + "range": [ + 318, + 322 + ], + "loc": { + "start": { + "line": 14, + "column": 26 + }, + "end": { + "line": 14, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "page", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Pagination", + "range": [ + 293, + 303 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Pagination", + "range": [ + 100, + 110 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "_", + "identifiers": [ + { + "type": "Identifier", + "name": "_", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "_", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "array", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "_", + "range": [ + 250, + 251 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 256, + 259 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 263, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "modifiers": [], + "range": [ + 260, + 268 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 276, + 278 + ], + "loc": { + "start": { + "line": 11, + "column": 23 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 270, + 278 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "range": [ + 260, + 279 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 26 + } + } + } + ], + "selfClosing": true, + "range": [ + 255, + 282 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 255, + 282 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 29 + } + } + } + ], + "else": null, + "range": [ + 234, + 290 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 12, + "column": 7 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "array", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "array", + "range": [ + 241, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json new file mode 100644 index 00000000..cf076acd --- /dev/null +++ b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json @@ -0,0 +1,378 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "src", + "identifiers": [ + { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "'Hello'", + "value": "Hello", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 62, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 62, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 26, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json new file mode 100644 index 00000000..e3e48d32 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json @@ -0,0 +1,2344 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 95, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 72, + 83 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 68, + 83 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 174, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 95, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 95, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 91, + 106 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + }, + { + "name": "$b", + "identifiers": [ + { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'abc'", + "value": "abc", + "range": [ + 119, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "range": [ + 114, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 183, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + } + ] + }, + { + "name": "$c", + "identifiers": [ + { + "type": "Identifier", + "name": "$c", + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Type", + "name": { + "type": "Identifier", + "name": "$c", + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "TSTypeAliasDeclaration", + "id": { + "type": "Identifier", + "name": "$c", + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "typeAnnotation": { + "type": "TSLiteralType", + "literal": { + "type": "Literal", + "raw": "'abc'", + "value": "abc", + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 126, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$c", + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ] + }, + { + "name": "c", + "identifiers": [ + { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "'abc'", + "value": "abc", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 149, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$c", + "range": [ + 192, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 95, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$c", + "range": [ + 131, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 174, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 183, + 185 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$b", + "range": [ + 114, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$c", + "range": [ + 192, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "$c", + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 152, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 150, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "range": [ + 149, + 154 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$unknown", + "range": [ + 197, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$unknown", + "range": [ + 197, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$unknown", + "range": [ + 197, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json new file mode 100644 index 00000000..59d4ba2a --- /dev/null +++ b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json @@ -0,0 +1,1406 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "writable", + "identifiers": [ + { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 167, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 89, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 85, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + } + ] + }, + { + "name": "$a", + "identifiers": [ + { + "type": "Identifier", + "name": "$a", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 120, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 118, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "$a", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 120, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 118, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "$a", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 120, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 118, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "init": null, + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 216, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$a", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 120, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 118, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "writable", + "range": [ + 167, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 167, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "range": [ + 163, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ] + }, + { + "name": "$b", + "identifiers": [ + { + "type": "Identifier", + "name": "$b", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 198, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 196, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 194, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "$b", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 198, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 196, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 194, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "$b", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 198, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 196, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 194, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "init": null, + "range": [ + 194, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 221, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$b", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 198, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 196, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 194, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writable", + "range": [ + 167, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writable", + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$a", + "range": [ + 216, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$a", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 120, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 118, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "range": [ + 116, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$b", + "range": [ + 221, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$b", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 198, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 196, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "range": [ + 194, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 25 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json new file mode 100644 index 00000000..db945206 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json @@ -0,0 +1,5180 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Writable", + "identifiers": [ + { + "type": "Identifier", + "name": "Writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "Writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "Writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "Readable", + "identifiers": [ + { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "node": { + "type": "ImportSpecifier", + "importKind": "value", + "imported": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "local": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + } + ] + }, + { + "name": "maybeUndef", + "identifiers": [ + { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "init": null, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 240, + 251 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 301, + 312 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 301, + 312 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + } + ] + }, + { + "name": "maybeNull", + "identifiers": [ + { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "init": null, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 255, + 265 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 315, + 325 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 315, + 325 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + } + ] + }, + { + "name": "maybeNullAndStr", + "identifiers": [ + { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "init": null, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 269, + 285 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 328, + 344 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 328, + 344 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + } + ] + }, + { + "name": "fn", + "identifiers": [ + { + "type": "Identifier", + "name": "fn", + "range": [ + 231, + 233 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "fn", + "range": [ + 231, + 233 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 240, + 251 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "range": [ + 240, + 252 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 255, + 265 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "range": [ + 255, + 266 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 269, + 285 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "range": [ + 269, + 286 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 19 + } + } + } + ], + "range": [ + 236, + 289 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "fn", + "range": [ + 231, + 233 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "params": [], + "range": [ + 222, + 289 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 11, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Writable", + "range": [ + 29, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Readable", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 301, + 312 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 315, + 325 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 328, + 344 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 240, + 251 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 255, + 265 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 269, + 285 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$maybeUndef", + "range": [ + 240, + 251 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeUndef", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSNumberKeyword", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Writable", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 88, + 104 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "TSUndefinedKeyword", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + ], + "range": [ + 88, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 86, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + "range": [ + 76, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNull", + "range": [ + 255, + 265 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNull", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSStringKeyword", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 141, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 133, + 141 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 133, + 149 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 152, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 35 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 133, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 131, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 122, + 156 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$maybeNullAndStr", + "range": [ + 269, + 285 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "maybeNullAndStr", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSUnionType", + "types": [ + { + "type": "TSTypeReference", + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSBooleanKeyword", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 38 + } + } + } + ], + "range": [ + 187, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "typeName": { + "type": "Identifier", + "name": "Readable", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 179, + 196 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "TSNullKeyword", + "range": [ + 199, + 203 + ], + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 46 + } + } + }, + { + "type": "TSStringKeyword", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + ], + "range": [ + 179, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 177, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 162, + 212 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json new file mode 100644 index 00000000..91a012c6 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json @@ -0,0 +1,3910 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "MyActionParam", + "identifiers": [ + { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Type", + "name": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "TSTypeAliasDeclaration", + "id": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "typeAnnotation": { + "type": "TSFunctionType", + "params": [], + "returnType": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSFunctionType", + "params": [ + { + "type": "Identifier", + "name": "p", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 59, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 46 + } + } + } + ], + "range": [ + 52, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 50, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 49, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 48 + } + } + } + ], + "returnType": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSVoidKeyword", + "range": [ + 72, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 53 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 50 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 48, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 45, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 42, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 21, + 77 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 58 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "name": "myAction", + "identifiers": [ + { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "params", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 162, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 153, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "range": [ + 147, + 171 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "range": [ + 183, + 193 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "result", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 176, + 194 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 176, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 215, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 230, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "range": [ + 215, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "range": [ + 207, + 239 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "range": [ + 200, + 240 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + ], + "range": [ + 141, + 244 + ], + "loc": { + "start": { + "line": 3, + "column": 63 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "_node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 103, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 98, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + } + ], + "range": [ + 80, + 244 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "myAction", + "range": [ + 359, + 367 + ], + "loc": { + "start": { + "line": 19, + "column": 18 + }, + "end": { + "line": 19, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "myAction", + "range": [ + 267, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Parameters", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "myAction", + "range": [ + 359, + 367 + ], + "loc": { + "start": { + "line": 19, + "column": 18 + }, + "end": { + "line": 19, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "myAction", + "range": [ + 267, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "functionType", + "variables": [], + "references": [], + "childScopes": [ + { + "type": "functionType", + "variables": [ + { + "name": "p", + "identifiers": [ + { + "type": "Identifier", + "name": "p", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 59, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 46 + } + } + } + ], + "range": [ + 52, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 50, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 49, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 48 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "p", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 59, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 46 + } + } + } + ], + "range": [ + 52, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 50, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 49, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "node": { + "type": "TSFunctionType", + "params": [ + { + "type": "Identifier", + "name": "p", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 59, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 40 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 46 + } + } + } + ], + "range": [ + 52, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 50, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 31 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + "range": [ + 49, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 48 + } + } + } + ], + "returnType": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSVoidKeyword", + "range": [ + 72, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 53 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 69, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 50 + }, + "end": { + "line": 2, + "column": 57 + } + } + }, + "range": [ + 48, + 76 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 57 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "_node", + "identifiers": [ + { + "type": "Identifier", + "name": "_node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 103, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 98, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "_node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 103, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 98, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "params", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 162, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 153, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "range": [ + 147, + 171 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "range": [ + 183, + 193 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "result", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 176, + 194 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 176, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 215, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 230, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "range": [ + 215, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "range": [ + 207, + 239 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "range": [ + 200, + 240 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + ], + "range": [ + 141, + 244 + ], + "loc": { + "start": { + "line": 3, + "column": 63 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "_node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 103, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 98, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + } + ], + "range": [ + 80, + 244 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + } + ], + "references": [] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "params", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 162, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 153, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "range": [ + 147, + 171 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "foo", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "range": [ + 183, + 193 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "result", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 176, + 194 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "range": [ + 176, + 195 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "destroy", + "range": [ + 215, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [], + "range": [ + 230, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 224, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "range": [ + 215, + 232 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "range": [ + 207, + 239 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + "range": [ + 200, + 240 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 8, + "column": 6 + } + } + } + ], + "range": [ + 141, + 244 + ], + "loc": { + "start": { + "line": 3, + "column": 63 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "myAction", + "range": [ + 89, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "_node", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 103, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 98, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + } + ], + "range": [ + 80, + 244 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + } + } + ] + }, + { + "name": "result", + "identifiers": [ + { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "params", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 162, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 153, + 170 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "result", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "params", + "range": [ + 162, + 168 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "params", + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 124, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "range": [ + 118, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 40 + }, + "end": { + "line": 3, + "column": 61 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "result", + "range": [ + 176, + 182 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "result", + "range": [ + 153, + 159 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 126, + 139 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 61 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyActionParam", + "range": [ + 26, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "param", + "identifiers": [ + { + "type": "Identifier", + "name": "param", + "range": [ + 297, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "param", + "range": [ + 297, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "param", + "range": [ + 315, + 320 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "foo", + "range": [ + 321, + 324 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "range": [ + 315, + 324 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "range": [ + 315, + 325 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 16 + } + } + } + ], + "range": [ + 307, + 331 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "param", + "range": [ + 297, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 17 + } + } + } + ], + "range": [ + 296, + 331 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 16, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "param", + "range": [ + 315, + 320 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "param", + "range": [ + 297, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "param", + "range": [ + 315, + 320 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "param", + "range": [ + 297, + 302 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "HTMLElement", + "range": [ + 105, + 116 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Parameters", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 19, + "column": 0 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json new file mode 100644 index 00000000..8e268574 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json @@ -0,0 +1,5922 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "pannable", + "identifiers": [ + { + "type": "Identifier", + "name": "pannable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "pannable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "pannable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "pannable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pannable", + "range": [ + 818, + 826 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pannable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "spring", + "identifiers": [ + { + "type": "Identifier", + "name": "spring", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "spring", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "spring", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "local": { + "type": "Identifier", + "name": "spring", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "spring", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spring", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ] + }, + { + "name": "coords", + "identifiers": [ + { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 28 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "range": [ + 119, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + "range": [ + 125, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + ], + "range": [ + 117, + 131 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 37 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "stiffness", + "range": [ + 137, + 146 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0.2", + "value": 0.2, + "range": [ + 148, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 137, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "damping", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0.4", + "value": 0.4, + "range": [ + 164, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "range": [ + 155, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 14 + } + } + } + ], + "range": [ + 133, + 170 + ], + "loc": { + "start": { + "line": 5, + "column": 39 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "spring", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 110, + 171 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + "range": [ + 101, + 171 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 205, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 224, + 230 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 283, + 289 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 425, + 431 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 451, + 457 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 943, + 950 + ], + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 957, + 964 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 49, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 957, + 964 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 49, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 981, + 988 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 981, + 988 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handlePanStart", + "identifiers": [ + { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 184, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 184, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 205, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "stiffness", + "range": [ + 212, + 221 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "range": [ + 205, + 221 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "operator": "=", + "right": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 224, + 230 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "damping", + "range": [ + 231, + 238 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "range": [ + 224, + 238 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 35 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 241, + 242 + ], + "loc": { + "start": { + "line": 11, + "column": 38 + }, + "end": { + "line": 11, + "column": 39 + } + } + }, + "range": [ + 224, + 242 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 39 + } + } + }, + "range": [ + 205, + 242 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 39 + } + } + }, + "range": [ + 205, + 243 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 40 + } + } + } + ], + "range": [ + 201, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 184, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "params": [], + "range": [ + 175, + 246 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 841, + 855 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 184, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + } + ] + }, + { + "name": "handlePanMove", + "identifiers": [ + { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 314, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$coords", + "range": [ + 317, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 325, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "range": [ + 317, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 329, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 335, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 24 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "range": [ + 329, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "dx", + "range": [ + 342, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 31 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 329, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 317, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 314, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 349, + 350 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$coords", + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 360, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "range": [ + 352, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 370, + 376 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 364, + 376 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "dy", + "range": [ + 377, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 31 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 352, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 349, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 309, + 383 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + ], + "range": [ + 297, + 384 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 283, + 289 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "update", + "range": [ + 290, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "range": [ + 283, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 283, + 385 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 283, + 386 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 6 + } + } + } + ], + "range": [ + 279, + 389 + ], + "loc": { + "start": { + "line": 14, + "column": 31 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + ], + "range": [ + 249, + 389 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 870, + 883 + ], + "loc": { + "start": { + "line": 46, + "column": 13 + }, + "end": { + "line": 46, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 23 + } + } + } + } + ] + }, + { + "name": "handlePanEnd", + "identifiers": [ + { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 401, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 401, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 425, + 431 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "stiffness", + "range": [ + 432, + 441 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + "range": [ + 425, + 441 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "0.2", + "value": 0.2, + "range": [ + 444, + 447 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 24 + } + } + }, + "range": [ + 425, + 447 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 24 + } + } + }, + "range": [ + 425, + 448 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 451, + 457 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "damping", + "range": [ + 458, + 465 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 16 + } + } + }, + "range": [ + 451, + 465 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 16 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "0.4", + "value": 0.4, + "range": [ + 468, + 471 + ], + "loc": { + "start": { + "line": 23, + "column": 19 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "range": [ + 451, + 471 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "range": [ + 451, + 472 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 23 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 488, + 489 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 24, + "column": 18 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "range": [ + 488, + 492 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 497, + 498 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "range": [ + 494, + 498 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 25 + } + } + } + ], + "range": [ + 486, + 500 + ], + "loc": { + "start": { + "line": 24, + "column": 13 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "set", + "range": [ + 482, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "range": [ + 475, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 475, + 501 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 475, + 502 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 29 + } + } + } + ], + "range": [ + 421, + 505 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 25, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 401, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 414, + 419 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 28 + } + } + } + ], + "range": [ + 392, + 505 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 897, + 909 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 401, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "spring", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spring", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pannable", + "range": [ + 818, + 826 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pannable", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 841, + 855 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handlePanStart", + "range": [ + 184, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 870, + 883 + ], + "loc": { + "start": { + "line": 46, + "column": 13 + }, + "end": { + "line": 46, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 897, + 909 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 401, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 943, + 950 + ], + "loc": { + "start": { + "line": 49, + "column": 13 + }, + "end": { + "line": 49, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 957, + 964 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 49, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 981, + 988 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 205, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 224, + 230 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 205, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 224, + 230 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 314, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$coords", + "range": [ + 317, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 325, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "range": [ + 317, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 329, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 335, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 24 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "range": [ + 329, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "dx", + "range": [ + 342, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 31 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 329, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 317, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 314, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 349, + 350 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$coords", + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 360, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "range": [ + 352, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 370, + 376 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 364, + 376 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "dy", + "range": [ + 377, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 31 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 352, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 349, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 309, + 383 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + ], + "range": [ + 297, + 384 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 283, + 289 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "update", + "range": [ + 290, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "range": [ + 283, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 283, + 385 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 283, + 386 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 18, + "column": 6 + } + } + } + ], + "range": [ + 279, + 389 + ], + "loc": { + "start": { + "line": 14, + "column": 31 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handlePanMove", + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + ], + "range": [ + 249, + 389 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 329, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 283, + 289 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "$coords", + "identifiers": [ + { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 314, + 315 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$coords", + "range": [ + 317, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 325, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "range": [ + 317, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 329, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 335, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 24 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "range": [ + 329, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "dx", + "range": [ + 342, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 31 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 329, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 317, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + "range": [ + 314, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 33 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 349, + 350 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$coords", + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 360, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "range": [ + 352, + 361 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 370, + 376 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 364, + 376 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "dy", + "range": [ + 377, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 31 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 352, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 349, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 309, + 383 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + ], + "range": [ + 297, + 384 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 18, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 317, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 317, + 324 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 329, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "$coords", + "range": [ + 297, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 329, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 364, + 369 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 283, + 289 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 414, + 419 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 414, + 419 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 28 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 425, + 431 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "stiffness", + "range": [ + 432, + 441 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + "range": [ + 425, + 441 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "0.2", + "value": 0.2, + "range": [ + 444, + 447 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 24 + } + } + }, + "range": [ + 425, + 447 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 24 + } + } + }, + "range": [ + 425, + 448 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 451, + 457 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "damping", + "range": [ + 458, + 465 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 16 + } + } + }, + "range": [ + 451, + 465 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 16 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "0.4", + "value": 0.4, + "range": [ + 468, + 471 + ], + "loc": { + "start": { + "line": 23, + "column": 19 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "range": [ + 451, + 471 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "range": [ + 451, + 472 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 23 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 488, + 489 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 24, + "column": 18 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "range": [ + 488, + 492 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 497, + 498 + ], + "loc": { + "start": { + "line": 24, + "column": 24 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "range": [ + 494, + 498 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 25 + } + } + } + ], + "range": [ + 486, + 500 + ], + "loc": { + "start": { + "line": 24, + "column": 13 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "set", + "range": [ + 482, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "range": [ + 475, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 475, + 501 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 475, + 502 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 29 + } + } + } + ], + "range": [ + 421, + 505 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 25, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handlePanEnd", + "range": [ + 401, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 414, + 419 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 28 + } + } + } + ], + "range": [ + 392, + 505 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 425, + 431 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 451, + 457 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 425, + 431 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 451, + 457 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json new file mode 100644 index 00000000..6947f25c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json @@ -0,0 +1,298 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'world'", + "value": "world", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 14, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 52, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json new file mode 100644 index 00000000..478f1ddf --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json @@ -0,0 +1,1289 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "longpress", + "identifiers": [ + { + "type": "Identifier", + "name": "longpress", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "longpress", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "longpress", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "local": { + "type": "Identifier", + "name": "longpress", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "longpress", + "range": [ + 218, + 227 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "longpress", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "pressed", + "identifiers": [ + { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "range": [ + 60, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 301, + 308 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 350, + 357 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "Literal", + "raw": "2000", + "value": 2000, + "range": [ + 93, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "range": [ + 82, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 149, + 157 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 229, + 237 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 406, + 414 + ], + "loc": { + "start": { + "line": 19, + "column": 47 + }, + "end": { + "line": 19, + "column": 55 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 149, + 157 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 184, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 229, + 237 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "longpress", + "range": [ + 218, + 227 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "longpress", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 350, + 357 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 301, + 308 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "pressed", + "range": [ + 301, + 308 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "pressed", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 406, + 414 + ], + "loc": { + "start": { + "line": 19, + "column": 47 + }, + "end": { + "line": 19, + "column": 55 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 406, + 414 + ], + "loc": { + "start": { + "line": 19, + "column": 47 + }, + "end": { + "line": 19, + "column": 55 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 82, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json new file mode 100644 index 00000000..b8fd24ef --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json @@ -0,0 +1,609 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "fly", + "identifiers": [ + { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "local": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 56, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 129, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 163, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 129, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 163, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 56, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 187, + 190 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json new file mode 100644 index 00000000..4c6db18a --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json @@ -0,0 +1,21445 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "flip", + "identifiers": [ + { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 1938, + 1942 + ], + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "quintOut", + "identifiers": [ + { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ] + }, + { + "name": "crossfade", + "identifiers": [ + { + "type": "Identifier", + "name": "crossfade", + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "local": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "send", + "identifiers": [ + { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ArrayPattern", + "elements": [ + { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "range": [ + 148, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 180, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "d", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 209, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "range": [ + 205, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 195, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "range": [ + 190, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + "range": [ + 180, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "fallback", + "range": [ + 218, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 260, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 39 + } + } + }, + "range": [ + 252, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 39 + } + } + } + ], + "range": [ + 246, + 283 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 345, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 339, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 334, + 336 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 311, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "range": [ + 305, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 325, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 293, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 70 + } + } + } + ], + "range": [ + 287, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 373, + 381 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 383, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + "range": [ + 373, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 392, + 398 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "range": [ + 392, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 414, + 417 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 453, + 463 + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 464, + 484 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 424, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + ], + "range": [ + 419, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "range": [ + 414, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 367, + 497 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 360, + 498 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 20, + "column": 5 + } + } + } + ], + "range": [ + 241, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 233, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 226, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 218, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + } + ], + "range": [ + 176, + 505 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 166, + 506 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 22, + "column": 3 + } + } + }, + "range": [ + 148, + 506 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 22, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1521, + 1525 + ], + "loc": { + "start": { + "line": 68, + "column": 8 + }, + "end": { + "line": 68, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1902, + 1906 + ], + "loc": { + "start": { + "line": 84, + "column": 8 + }, + "end": { + "line": 84, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + } + ] + }, + { + "name": "receive", + "identifiers": [ + { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ArrayPattern", + "elements": [ + { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + ], + "range": [ + 148, + 163 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 180, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "d", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 209, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "range": [ + 205, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 195, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "range": [ + 190, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + "range": [ + 180, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "fallback", + "range": [ + 218, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 260, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 39 + } + } + }, + "range": [ + 252, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 39 + } + } + } + ], + "range": [ + 246, + 283 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 345, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 339, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 334, + 336 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 311, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "range": [ + 305, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 325, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 293, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 70 + } + } + } + ], + "range": [ + 287, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 373, + 381 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 383, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + "range": [ + 373, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 392, + 398 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "range": [ + 392, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 414, + 417 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 453, + 463 + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 464, + 484 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 424, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + ], + "range": [ + 419, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "range": [ + 414, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 367, + 497 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 360, + 498 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 20, + "column": 5 + } + } + } + ], + "range": [ + 241, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 233, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 226, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 218, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + } + ], + "range": [ + 176, + 505 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 166, + 506 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 22, + "column": 3 + } + } + }, + "range": [ + 148, + 506 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 22, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1486, + 1493 + ], + "loc": { + "start": { + "line": 67, + "column": 7 + }, + "end": { + "line": 67, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1867, + 1874 + ], + "loc": { + "start": { + "line": 83, + "column": 7 + }, + "end": { + "line": 83, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + } + ] + }, + { + "name": "uid", + "identifiers": [ + { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 520, + 521 + ], + "loc": { + "start": { + "line": 24, + "column": 11 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "range": [ + 514, + 521 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 547, + 550 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 609, + 612 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 679, + 682 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 739, + 742 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 798, + 801 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 860, + 863 + ], + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 964, + 967 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + } + ] + }, + { + "name": "todos", + "identifiers": [ + { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 543, + 545 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 547, + 550 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 547, + 552 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "range": [ + 543, + 552 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 554, + 558 + ], + "loc": { + "start": { + "line": 27, + "column": 15 + }, + "end": { + "line": 27, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 560, + 565 + ], + "loc": { + "start": { + "line": 27, + "column": 21 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 554, + 565 + ], + "loc": { + "start": { + "line": 27, + "column": 15 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 567, + 578 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'write some docs'", + "value": "write some docs", + "range": [ + 580, + 597 + ], + "loc": { + "start": { + "line": 27, + "column": 41 + }, + "end": { + "line": 27, + "column": 58 + } + } + }, + "range": [ + 567, + 597 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 58 + } + } + } + ], + "range": [ + 541, + 599 + ], + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 27, + "column": 60 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 605, + 607 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 609, + 612 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 13 + } + } + }, + "range": [ + 605, + 614 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 616, + 620 + ], + "loc": { + "start": { + "line": 28, + "column": 15 + }, + "end": { + "line": 28, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 622, + 627 + ], + "loc": { + "start": { + "line": 28, + "column": 21 + }, + "end": { + "line": 28, + "column": 26 + } + } + }, + "range": [ + 616, + 627 + ], + "loc": { + "start": { + "line": 28, + "column": 15 + }, + "end": { + "line": 28, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 629, + 640 + ], + "loc": { + "start": { + "line": 28, + "column": 28 + }, + "end": { + "line": 28, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'start writing blog post'", + "value": "start writing blog post", + "range": [ + 642, + 667 + ], + "loc": { + "start": { + "line": 28, + "column": 41 + }, + "end": { + "line": 28, + "column": 66 + } + } + }, + "range": [ + 629, + 667 + ], + "loc": { + "start": { + "line": 28, + "column": 28 + }, + "end": { + "line": 28, + "column": 66 + } + } + } + ], + "range": [ + 603, + 669 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 68 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 675, + 677 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 679, + 682 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 679, + 684 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "range": [ + 675, + 684 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 686, + 690 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 692, + 696 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 25 + } + } + }, + "range": [ + 686, + 696 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 699, + 710 + ], + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'buy some milk'", + "value": "buy some milk", + "range": [ + 712, + 727 + ], + "loc": { + "start": { + "line": 29, + "column": 41 + }, + "end": { + "line": 29, + "column": 56 + } + } + }, + "range": [ + 699, + 727 + ], + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 56 + } + } + } + ], + "range": [ + 673, + 729 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 58 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 735, + 737 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 739, + 742 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 739, + 744 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 13 + } + } + }, + "range": [ + 735, + 744 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 746, + 750 + ], + "loc": { + "start": { + "line": 30, + "column": 15 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 752, + 757 + ], + "loc": { + "start": { + "line": 30, + "column": 21 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + "range": [ + 746, + 757 + ], + "loc": { + "start": { + "line": 30, + "column": 15 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 759, + 770 + ], + "loc": { + "start": { + "line": 30, + "column": 28 + }, + "end": { + "line": 30, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'mow the lawn'", + "value": "mow the lawn", + "range": [ + 772, + 786 + ], + "loc": { + "start": { + "line": 30, + "column": 41 + }, + "end": { + "line": 30, + "column": 55 + } + } + }, + "range": [ + 759, + 786 + ], + "loc": { + "start": { + "line": 30, + "column": 28 + }, + "end": { + "line": 30, + "column": 55 + } + } + } + ], + "range": [ + 733, + 788 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 57 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 794, + 796 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 798, + 801 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 798, + 803 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + "range": [ + 794, + 803 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 805, + 809 + ], + "loc": { + "start": { + "line": 31, + "column": 15 + }, + "end": { + "line": 31, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 811, + 816 + ], + "loc": { + "start": { + "line": 31, + "column": 21 + }, + "end": { + "line": 31, + "column": 26 + } + } + }, + "range": [ + 805, + 816 + ], + "loc": { + "start": { + "line": 31, + "column": 15 + }, + "end": { + "line": 31, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 818, + 829 + ], + "loc": { + "start": { + "line": 31, + "column": 28 + }, + "end": { + "line": 31, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'feed the turtle'", + "value": "feed the turtle", + "range": [ + 831, + 848 + ], + "loc": { + "start": { + "line": 31, + "column": 41 + }, + "end": { + "line": 31, + "column": 58 + } + } + }, + "range": [ + 818, + 848 + ], + "loc": { + "start": { + "line": 31, + "column": 28 + }, + "end": { + "line": 31, + "column": 58 + } + } + } + ], + "range": [ + 792, + 850 + ], + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 60 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 856, + 858 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 860, + 863 + ], + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 860, + 865 + ], + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "range": [ + 856, + 865 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 867, + 871 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 873, + 878 + ], + "loc": { + "start": { + "line": 32, + "column": 21 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "range": [ + 867, + 878 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 880, + 891 + ], + "loc": { + "start": { + "line": 32, + "column": 28 + }, + "end": { + "line": 32, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'fix some bugs'", + "value": "fix some bugs", + "range": [ + 893, + 908 + ], + "loc": { + "start": { + "line": 32, + "column": 41 + }, + "end": { + "line": 32, + "column": 56 + } + } + }, + "range": [ + 880, + 908 + ], + "loc": { + "start": { + "line": 32, + "column": 28 + }, + "end": { + "line": 32, + "column": 56 + } + } + } + ], + "range": [ + 854, + 910 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 58 + } + } + } + ], + "range": [ + 537, + 914 + ], + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 33, + "column": 2 + } + } + }, + "range": [ + 529, + 914 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 33, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1023, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1041, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1100, + 1105 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1108, + 1113 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1210, + 1215 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1218, + 1223 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1423, + 1428 + ], + "loc": { + "start": { + "line": 65, + "column": 9 + }, + "end": { + "line": 65, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1788, + 1793 + ], + "loc": { + "start": { + "line": 80, + "column": 9 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + } + ] + }, + { + "name": "add", + "identifiers": [ + { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 960, + 962 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 964, + 967 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 964, + 969 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "range": [ + 960, + 969 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 974, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 980, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + "range": [ + 974, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 990, + 1001 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1003, + 1008 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1009, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 22 + }, + "end": { + "line": 39, + "column": 27 + } + } + }, + "range": [ + 1003, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 27 + } + } + }, + "range": [ + 990, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 27 + } + } + } + ], + "range": [ + 955, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + "range": [ + 948, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 40, + "column": 3 + } + } + } + ], + "range": [ + 942, + 1019 + ], + "loc": { + "start": { + "line": 36, + "column": 2 + }, + "end": { + "line": 40, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1023, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1032, + 1036 + ], + "loc": { + "start": { + "line": 42, + "column": 11 + }, + "end": { + "line": 42, + "column": 15 + } + } + }, + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [ + 1041, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + } + }, + "range": [ + 1038, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 17 + }, + "end": { + "line": 42, + "column": 25 + } + } + } + ], + "range": [ + 1031, + 1047 + ], + "loc": { + "start": { + "line": 42, + "column": 10 + }, + "end": { + "line": 42, + "column": 26 + } + } + }, + "range": [ + 1023, + 1047 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 26 + } + } + }, + "range": [ + 1023, + 1048 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 27 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1051, + 1056 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1057, + 1062 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + }, + "range": [ + 1051, + 1062 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 1065, + 1067 + ], + "loc": { + "start": { + "line": 43, + "column": 16 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + "range": [ + 1051, + 1067 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + "range": [ + 1051, + 1068 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 19 + } + } + } + ], + "range": [ + 938, + 1071 + ], + "loc": { + "start": { + "line": 35, + "column": 21 + }, + "end": { + "line": 44, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + ], + "range": [ + 918, + 1071 + ], + "loc": { + "start": { + "line": 35, + "column": 1 + }, + "end": { + "line": 44, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 1359, + 1362 + ], + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + } + } + ] + }, + { + "name": "remove", + "identifiers": [ + { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1100, + 1105 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 1126, + 1127 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "todo", + "range": [ + 1132, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "range": [ + 1126, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + } + ], + "range": [ + 1121, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1108, + 1113 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1114, + 1120 + ], + "loc": { + "start": { + "line": 47, + "column": 16 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "range": [ + 1108, + 1120 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1108, + 1137 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 39 + } + } + }, + "range": [ + 1100, + 1137 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 39 + } + } + }, + "range": [ + 1100, + 1138 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 40 + } + } + } + ], + "range": [ + 1096, + 1141 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 48, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + } + ], + "range": [ + 1074, + 1141 + ], + "loc": { + "start": { + "line": 46, + "column": 1 + }, + "end": { + "line": 48, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1194, + 1200 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1680, + 1686 + ], + "loc": { + "start": { + "line": 73, + "column": 29 + }, + "end": { + "line": 73, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 2090, + 2096 + ], + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + } + ] + }, + { + "name": "mark", + "identifiers": [ + { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1179, + 1183 + ], + "loc": { + "start": { + "line": 51, + "column": 7 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "range": [ + 1174, + 1183 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "done", + "range": [ + 1186, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "range": [ + 1174, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "range": [ + 1174, + 1191 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1201, + 1205 + ], + "loc": { + "start": { + "line": 52, + "column": 9 + }, + "end": { + "line": 52, + "column": 13 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1194, + 1200 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 1194, + 1206 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 14 + } + } + }, + "range": [ + 1194, + 1207 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1210, + 1215 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1231, + 1235 + ], + "loc": { + "start": { + "line": 53, + "column": 23 + }, + "end": { + "line": 53, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1218, + 1223 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 1224, + 1230 + ], + "loc": { + "start": { + "line": 53, + "column": 16 + }, + "end": { + "line": 53, + "column": 22 + } + } + }, + "range": [ + 1218, + 1230 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1218, + 1236 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 28 + } + } + }, + "range": [ + 1210, + 1236 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 28 + } + } + }, + "range": [ + 1210, + 1237 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 29 + } + } + } + ], + "range": [ + 1170, + 1240 + ], + "loc": { + "start": { + "line": 50, + "column": 27 + }, + "end": { + "line": 54, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + } + ], + "range": [ + 1144, + 1240 + ], + "loc": { + "start": { + "line": 50, + "column": 1 + }, + "end": { + "line": 54, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1609, + 1613 + ], + "loc": { + "start": { + "line": 71, + "column": 42 + }, + "end": { + "line": 71, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 2018, + 2022 + ], + "loc": { + "start": { + "line": 87, + "column": 50 + }, + "end": { + "line": 87, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 102, + 111 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 547, + 550 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 609, + 612 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 679, + 682 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 739, + 742 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 798, + 801 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 860, + 863 + ], + "loc": { + "start": { + "line": 32, + "column": 8 + }, + "end": { + "line": 32, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1423, + 1428 + ], + "loc": { + "start": { + "line": 65, + "column": 9 + }, + "end": { + "line": 65, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1788, + 1793 + ], + "loc": { + "start": { + "line": 80, + "column": 9 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "d", + "identifiers": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "d", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 209, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "range": [ + 205, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 200, + 204 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 195, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + ], + "range": [ + 190, + 213 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 260, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 39 + } + } + }, + "range": [ + 252, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 39 + } + } + } + ], + "range": [ + 246, + 283 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 345, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 339, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 334, + 336 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 311, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "range": [ + 305, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 325, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 293, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 70 + } + } + } + ], + "range": [ + 287, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 373, + 381 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 383, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + "range": [ + 373, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 392, + 398 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "range": [ + 392, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 414, + 417 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 453, + 463 + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 464, + 484 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 424, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + ], + "range": [ + 419, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "range": [ + 414, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 367, + 497 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 360, + 498 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 20, + "column": 5 + } + } + } + ], + "range": [ + 241, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 233, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 226, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 21, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + } + ] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 233, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 233, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 260, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 39 + } + } + }, + "range": [ + 252, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 39 + } + } + } + ], + "range": [ + 246, + 283 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 345, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 339, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 334, + 336 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 311, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "range": [ + 305, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 325, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 293, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 70 + } + } + } + ], + "range": [ + 287, + 355 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 373, + 381 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 383, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + "range": [ + 373, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 392, + 398 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "range": [ + 392, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 414, + 417 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 453, + 463 + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 464, + 484 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 424, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + ], + "range": [ + 419, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "range": [ + 414, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 367, + 497 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 360, + 498 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 20, + "column": 5 + } + } + } + ], + "range": [ + 241, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 233, + 239 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 226, + 502 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 21, + "column": 3 + } + } + } + } + ], + "references": [] + }, + { + "name": "style", + "identifiers": [ + { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 260, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 39 + } + } + }, + "range": [ + 252, + 282 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 39 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + } + ] + }, + { + "name": "transform", + "identifiers": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 345, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 339, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 334, + 336 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 311, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "range": [ + 305, + 320 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 325, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 331 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 47 + } + } + }, + "range": [ + 305, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 70 + } + } + }, + "range": [ + 293, + 354 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 70 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 305, + 310 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 339, + 344 + ], + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 252, + 257 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 453, + 463 + ], + "loc": { + "start": { + "line": 17, + "column": 27 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 464, + 484 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 424, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + ], + "range": [ + 419, + 492 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 17, + "column": 37 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 484, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 444, + 453 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 293, + 302 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 400, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 59, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "input", + "identifiers": [ + { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 960, + 962 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 964, + 967 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 964, + 969 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "range": [ + 960, + 969 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 974, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 980, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + "range": [ + 974, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 990, + 1001 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1003, + 1008 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1009, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 22 + }, + "end": { + "line": 39, + "column": 27 + } + } + }, + "range": [ + 1003, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 27 + } + } + }, + "range": [ + 990, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 27 + } + } + } + ], + "range": [ + 955, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + "range": [ + 948, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 40, + "column": 3 + } + } + } + ], + "range": [ + 942, + 1019 + ], + "loc": { + "start": { + "line": 36, + "column": 2 + }, + "end": { + "line": 40, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1023, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1032, + 1036 + ], + "loc": { + "start": { + "line": 42, + "column": 11 + }, + "end": { + "line": 42, + "column": 15 + } + } + }, + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [ + 1041, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + } + }, + "range": [ + 1038, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 17 + }, + "end": { + "line": 42, + "column": 25 + } + } + } + ], + "range": [ + 1031, + 1047 + ], + "loc": { + "start": { + "line": 42, + "column": 10 + }, + "end": { + "line": 42, + "column": 26 + } + } + }, + "range": [ + 1023, + 1047 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 26 + } + } + }, + "range": [ + 1023, + 1048 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 27 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1051, + 1056 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1057, + 1062 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + }, + "range": [ + 1051, + 1062 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 1065, + 1067 + ], + "loc": { + "start": { + "line": 43, + "column": 16 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + "range": [ + 1051, + 1067 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + "range": [ + 1051, + 1068 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 19 + } + } + } + ], + "range": [ + 938, + 1071 + ], + "loc": { + "start": { + "line": 35, + "column": 21 + }, + "end": { + "line": 44, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + ], + "range": [ + 918, + 1071 + ], + "loc": { + "start": { + "line": 35, + "column": 1 + }, + "end": { + "line": 44, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 1003, + 1008 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 1051, + 1056 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + } + ] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 960, + 962 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 964, + 967 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 964, + 969 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "range": [ + 960, + 969 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 974, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 980, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + "range": [ + 974, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 990, + 1001 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1003, + 1008 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1009, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 22 + }, + "end": { + "line": 39, + "column": 27 + } + } + }, + "range": [ + 1003, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 27 + } + } + }, + "range": [ + 990, + 1014 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 27 + } + } + } + ], + "range": [ + 955, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + "range": [ + 948, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 40, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1032, + 1036 + ], + "loc": { + "start": { + "line": 42, + "column": 11 + }, + "end": { + "line": 42, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 964, + 967 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 1003, + 1008 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1023, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1032, + 1036 + ], + "loc": { + "start": { + "line": 42, + "column": 11 + }, + "end": { + "line": 42, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 948, + 952 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1041, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 1051, + 1056 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 931, + 936 + ], + "loc": { + "start": { + "line": 35, + "column": 14 + }, + "end": { + "line": 35, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 964, + 967 + ], + "loc": { + "start": { + "line": 37, + "column": 7 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 514, + 517 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1023, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1041, + 1046 + ], + "loc": { + "start": { + "line": 42, + "column": 20 + }, + "end": { + "line": 42, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1100, + 1105 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 1126, + 1127 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "todo", + "range": [ + 1132, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "range": [ + 1126, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + } + ], + "range": [ + 1121, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1108, + 1113 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1114, + 1120 + ], + "loc": { + "start": { + "line": 47, + "column": 16 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "range": [ + 1108, + 1120 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1108, + 1137 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 39 + } + } + }, + "range": [ + 1100, + 1137 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 39 + } + } + }, + "range": [ + 1100, + 1138 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 40 + } + } + } + ], + "range": [ + 1096, + 1141 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 48, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + } + ], + "range": [ + 1074, + 1141 + ], + "loc": { + "start": { + "line": 46, + "column": 1 + }, + "end": { + "line": 48, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1132, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1100, + 1105 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1108, + 1113 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 1126, + 1127 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "todo", + "range": [ + 1132, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "range": [ + 1126, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + } + ], + "range": [ + 1121, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1126, + 1127 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1126, + 1127 + ], + "loc": { + "start": { + "line": 47, + "column": 28 + }, + "end": { + "line": 47, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1121, + 1122 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1132, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1132, + 1136 + ], + "loc": { + "start": { + "line": 47, + "column": 34 + }, + "end": { + "line": 47, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1090, + 1094 + ], + "loc": { + "start": { + "line": 46, + "column": 17 + }, + "end": { + "line": 46, + "column": 21 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1100, + 1105 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1108, + 1113 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1179, + 1183 + ], + "loc": { + "start": { + "line": 51, + "column": 7 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "range": [ + 1174, + 1183 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "done", + "range": [ + 1186, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "range": [ + 1174, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "range": [ + 1174, + 1191 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1201, + 1205 + ], + "loc": { + "start": { + "line": 52, + "column": 9 + }, + "end": { + "line": 52, + "column": 13 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1194, + 1200 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 1194, + 1206 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 14 + } + } + }, + "range": [ + 1194, + 1207 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1210, + 1215 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1231, + 1235 + ], + "loc": { + "start": { + "line": 53, + "column": 23 + }, + "end": { + "line": 53, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1218, + 1223 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 1224, + 1230 + ], + "loc": { + "start": { + "line": 53, + "column": 16 + }, + "end": { + "line": 53, + "column": 22 + } + } + }, + "range": [ + 1218, + 1230 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1218, + 1236 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 28 + } + } + }, + "range": [ + 1210, + 1236 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 28 + } + } + }, + "range": [ + 1210, + 1237 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 29 + } + } + } + ], + "range": [ + 1170, + 1240 + ], + "loc": { + "start": { + "line": 50, + "column": 27 + }, + "end": { + "line": 54, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + } + ], + "range": [ + 1144, + 1240 + ], + "loc": { + "start": { + "line": 50, + "column": 1 + }, + "end": { + "line": 54, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1201, + 1205 + ], + "loc": { + "start": { + "line": 52, + "column": 9 + }, + "end": { + "line": 52, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1231, + 1235 + ], + "loc": { + "start": { + "line": 53, + "column": 23 + }, + "end": { + "line": 53, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + } + ] + }, + { + "name": "done", + "identifiers": [ + { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1179, + 1183 + ], + "loc": { + "start": { + "line": 51, + "column": 7 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "range": [ + 1174, + 1183 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "done", + "range": [ + 1186, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "range": [ + 1174, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "range": [ + 1174, + 1191 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1201, + 1205 + ], + "loc": { + "start": { + "line": 52, + "column": 9 + }, + "end": { + "line": 52, + "column": 13 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1194, + 1200 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 1194, + 1206 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 14 + } + } + }, + "range": [ + 1194, + 1207 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1210, + 1215 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1231, + 1235 + ], + "loc": { + "start": { + "line": 53, + "column": 23 + }, + "end": { + "line": 53, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1218, + 1223 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 1224, + 1230 + ], + "loc": { + "start": { + "line": 53, + "column": 16 + }, + "end": { + "line": 53, + "column": 22 + } + } + }, + "range": [ + 1218, + 1230 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1218, + 1236 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 28 + } + } + }, + "range": [ + 1210, + 1236 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 28 + } + } + }, + "range": [ + 1210, + 1237 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 29 + } + } + } + ], + "range": [ + 1170, + 1240 + ], + "loc": { + "start": { + "line": 50, + "column": 27 + }, + "end": { + "line": 54, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + } + ], + "range": [ + 1144, + 1240 + ], + "loc": { + "start": { + "line": 50, + "column": 1 + }, + "end": { + "line": 54, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [ + 1186, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1174, + 1178 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [ + 1186, + 1190 + ], + "loc": { + "start": { + "line": 51, + "column": 14 + }, + "end": { + "line": 51, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [ + 1164, + 1168 + ], + "loc": { + "start": { + "line": 50, + "column": 21 + }, + "end": { + "line": 50, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1194, + 1200 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1201, + 1205 + ], + "loc": { + "start": { + "line": 52, + "column": 9 + }, + "end": { + "line": 52, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1210, + 1215 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1218, + 1223 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1231, + 1235 + ], + "loc": { + "start": { + "line": 53, + "column": 23 + }, + "end": { + "line": 53, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1158, + 1162 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1194, + 1200 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1210, + 1215 + ], + "loc": { + "start": { + "line": 53, + "column": 2 + }, + "end": { + "line": 53, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1218, + 1223 + ], + "loc": { + "start": { + "line": 53, + "column": 10 + }, + "end": { + "line": 53, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 529, + 534 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 1338, + 1339 + ], + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 1340, + 1343 + ], + "loc": { + "start": { + "line": 60, + "column": 21 + }, + "end": { + "line": 60, + "column": 24 + } + } + }, + "range": [ + 1338, + 1343 + ], + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 24 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 1348, + 1355 + ], + "loc": { + "start": { + "line": 60, + "column": 29 + }, + "end": { + "line": 60, + "column": 36 + } + } + }, + "range": [ + 1338, + 1355 + ], + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 36 + } + } + }, + "operator": "&&", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 1363, + 1364 + ], + "loc": { + "start": { + "line": 60, + "column": 44 + }, + "end": { + "line": 60, + "column": 45 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 1365, + 1371 + ], + "loc": { + "start": { + "line": 60, + "column": 46 + }, + "end": { + "line": 60, + "column": 52 + } + } + }, + "range": [ + 1363, + 1371 + ], + "loc": { + "start": { + "line": 60, + "column": 44 + }, + "end": { + "line": 60, + "column": 52 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "add", + "range": [ + 1359, + 1362 + ], + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 43 + } + } + }, + "optional": false, + "range": [ + 1359, + 1372 + ], + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 53 + } + } + }, + "range": [ + 1338, + 1372 + ], + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 53 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + } + ], + "range": [ + 1333, + 1372 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 53 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1338, + 1339 + ], + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1363, + 1364 + ], + "loc": { + "start": { + "line": 60, + "column": 44 + }, + "end": { + "line": 60, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1338, + 1339 + ], + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 1359, + 1362 + ], + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1363, + 1364 + ], + "loc": { + "start": { + "line": 60, + "column": 44 + }, + "end": { + "line": 60, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1333, + 1334 + ], + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 1359, + 1362 + ], + "loc": { + "start": { + "line": 60, + "column": 40 + }, + "end": { + "line": 60, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 927, + 930 + ], + "loc": { + "start": { + "line": 35, + "column": 10 + }, + "end": { + "line": 35, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1436, + 1437 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 1436, + 1437 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1442, + 1443 + ], + "loc": { + "start": { + "line": 65, + "column": 28 + }, + "end": { + "line": 65, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1444, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 30 + }, + "end": { + "line": 65, + "column": 34 + } + } + }, + "range": [ + 1442, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 28 + }, + "end": { + "line": 65, + "column": 34 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 1441, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 27 + }, + "end": { + "line": 65, + "column": 34 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1436, + 1437 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 23 + } + } + } + ], + "range": [ + 1436, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1442, + 1443 + ], + "loc": { + "start": { + "line": 65, + "column": 28 + }, + "end": { + "line": 65, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1436, + 1437 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1442, + 1443 + ], + "loc": { + "start": { + "line": 65, + "column": 28 + }, + "end": { + "line": 65, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1436, + 1437 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1442, + 1443 + ], + "loc": { + "start": { + "line": 65, + "column": 28 + }, + "end": { + "line": 65, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1444, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 30 + }, + "end": { + "line": 65, + "column": 34 + } + } + }, + "range": [ + 1442, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 28 + }, + "end": { + "line": 65, + "column": 34 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 1441, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 27 + }, + "end": { + "line": 65, + "column": 34 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1436, + 1437 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 23 + } + } + } + ], + "range": [ + 1436, + 1448 + ], + "loc": { + "start": { + "line": 65, + "column": 22 + }, + "end": { + "line": 65, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1423, + 1428 + ], + "loc": { + "start": { + "line": 65, + "column": 9 + }, + "end": { + "line": 65, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1429, + 1435 + ], + "loc": { + "start": { + "line": 65, + "column": 15 + }, + "end": { + "line": 65, + "column": 21 + } + } + }, + "range": [ + 1423, + 1435 + ], + "loc": { + "start": { + "line": 65, + "column": 9 + }, + "end": { + "line": 65, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 1423, + 1449 + ], + "loc": { + "start": { + "line": 65, + "column": 9 + }, + "end": { + "line": 65, + "column": 35 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + }, + "index": null, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1459, + 1463 + ], + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1464, + 1466 + ], + "loc": { + "start": { + "line": 65, + "column": 50 + }, + "end": { + "line": 65, + "column": 52 + } + } + }, + "range": [ + 1459, + 1466 + ], + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 52 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "label", + "range": [ + 1473, + 1478 + ], + "loc": { + "start": { + "line": 66, + "column": 4 + }, + "end": { + "line": 66, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "receive", + "range": [ + 1486, + 1493 + ], + "loc": { + "start": { + "line": 67, + "column": 7 + }, + "end": { + "line": 67, + "column": 14 + } + } + }, + "modifiers": [], + "range": [ + 1483, + 1493 + ], + "loc": { + "start": { + "line": 67, + "column": 4 + }, + "end": { + "line": 67, + "column": 14 + } + } + }, + "intro": true, + "outro": false, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1497, + 1500 + ], + "loc": { + "start": { + "line": 67, + "column": 18 + }, + "end": { + "line": 67, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1502, + 1506 + ], + "loc": { + "start": { + "line": 67, + "column": 23 + }, + "end": { + "line": 67, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1507, + 1509 + ], + "loc": { + "start": { + "line": 67, + "column": 28 + }, + "end": { + "line": 67, + "column": 30 + } + } + }, + "range": [ + 1502, + 1509 + ], + "loc": { + "start": { + "line": 67, + "column": 23 + }, + "end": { + "line": 67, + "column": 30 + } + } + }, + "range": [ + 1497, + 1509 + ], + "loc": { + "start": { + "line": 67, + "column": 18 + }, + "end": { + "line": 67, + "column": 30 + } + } + } + ], + "range": [ + 1496, + 1510 + ], + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 31 + } + } + }, + "range": [ + 1483, + 1512 + ], + "loc": { + "start": { + "line": 67, + "column": 4 + }, + "end": { + "line": 67, + "column": 33 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "send", + "range": [ + 1521, + 1525 + ], + "loc": { + "start": { + "line": 68, + "column": 8 + }, + "end": { + "line": 68, + "column": 12 + } + } + }, + "modifiers": [], + "range": [ + 1517, + 1525 + ], + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 68, + "column": 12 + } + } + }, + "intro": false, + "outro": true, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1529, + 1532 + ], + "loc": { + "start": { + "line": 68, + "column": 16 + }, + "end": { + "line": 68, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1534, + 1538 + ], + "loc": { + "start": { + "line": 68, + "column": 21 + }, + "end": { + "line": 68, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1539, + 1541 + ], + "loc": { + "start": { + "line": 68, + "column": 26 + }, + "end": { + "line": 68, + "column": 28 + } + } + }, + "range": [ + 1534, + 1541 + ], + "loc": { + "start": { + "line": 68, + "column": 21 + }, + "end": { + "line": 68, + "column": 28 + } + } + }, + "range": [ + 1529, + 1541 + ], + "loc": { + "start": { + "line": 68, + "column": 16 + }, + "end": { + "line": 68, + "column": 28 + } + } + } + ], + "range": [ + 1528, + 1542 + ], + "loc": { + "start": { + "line": 68, + "column": 15 + }, + "end": { + "line": 68, + "column": 29 + } + } + }, + "range": [ + 1517, + 1544 + ], + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 68, + "column": 31 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 1549, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 4 + }, + "end": { + "line": 69, + "column": 16 + } + } + }, + "expression": null, + "range": [ + 1549, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 4 + }, + "end": { + "line": 69, + "column": 16 + } + } + } + ], + "selfClosing": false, + "range": [ + 1472, + 1566 + ], + "loc": { + "start": { + "line": 66, + "column": 3 + }, + "end": { + "line": 70, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1566, + 1571 + ], + "loc": { + "start": { + "line": 70, + "column": 4 + }, + "end": { + "line": 71, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 1572, + 1577 + ], + "loc": { + "start": { + "line": 71, + "column": 5 + }, + "end": { + "line": 71, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "type", + "range": [ + 1578, + 1582 + ], + "loc": { + "start": { + "line": 71, + "column": 11 + }, + "end": { + "line": 71, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "checkbox", + "range": [ + 1583, + 1591 + ], + "loc": { + "start": { + "line": 71, + "column": 16 + }, + "end": { + "line": 71, + "column": 24 + } + } + } + ], + "range": [ + 1578, + 1591 + ], + "loc": { + "start": { + "line": 71, + "column": 11 + }, + "end": { + "line": 71, + "column": 24 + } + } + }, + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "change", + "range": [ + 1595, + 1601 + ], + "loc": { + "start": { + "line": 71, + "column": 28 + }, + "end": { + "line": 71, + "column": 34 + } + } + }, + "modifiers": [], + "range": [ + 1592, + 1601 + ], + "loc": { + "start": { + "line": 71, + "column": 25 + }, + "end": { + "line": 71, + "column": 34 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1614, + 1618 + ], + "loc": { + "start": { + "line": 71, + "column": 47 + }, + "end": { + "line": 71, + "column": 51 + } + } + }, + { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 1620, + 1624 + ], + "loc": { + "start": { + "line": 71, + "column": 53 + }, + "end": { + "line": 71, + "column": 57 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "mark", + "range": [ + 1609, + 1613 + ], + "loc": { + "start": { + "line": 71, + "column": 42 + }, + "end": { + "line": 71, + "column": 46 + } + } + }, + "optional": false, + "range": [ + 1609, + 1625 + ], + "loc": { + "start": { + "line": 71, + "column": 42 + }, + "end": { + "line": 71, + "column": 58 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 1603, + 1625 + ], + "loc": { + "start": { + "line": 71, + "column": 36 + }, + "end": { + "line": 71, + "column": 58 + } + } + }, + "range": [ + 1592, + 1626 + ], + "loc": { + "start": { + "line": 71, + "column": 25 + }, + "end": { + "line": 71, + "column": 59 + } + } + } + ], + "selfClosing": false, + "range": [ + 1571, + 1627 + ], + "loc": { + "start": { + "line": 71, + "column": 4 + }, + "end": { + "line": 71, + "column": 60 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 1571, + 1627 + ], + "loc": { + "start": { + "line": 71, + "column": 4 + }, + "end": { + "line": 71, + "column": 60 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1627, + 1632 + ], + "loc": { + "start": { + "line": 71, + "column": 60 + }, + "end": { + "line": 72, + "column": 4 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1633, + 1637 + ], + "loc": { + "start": { + "line": 72, + "column": 5 + }, + "end": { + "line": 72, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "description", + "range": [ + 1638, + 1649 + ], + "loc": { + "start": { + "line": 72, + "column": 10 + }, + "end": { + "line": 72, + "column": 21 + } + } + }, + "range": [ + 1633, + 1649 + ], + "loc": { + "start": { + "line": 72, + "column": 5 + }, + "end": { + "line": 72, + "column": 21 + } + } + }, + "range": [ + 1632, + 1650 + ], + "loc": { + "start": { + "line": 72, + "column": 4 + }, + "end": { + "line": 72, + "column": 22 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1650, + 1655 + ], + "loc": { + "start": { + "line": 72, + "column": 22 + }, + "end": { + "line": 73, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 1656, + 1662 + ], + "loc": { + "start": { + "line": 73, + "column": 5 + }, + "end": { + "line": 73, + "column": 11 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 1666, + 1671 + ], + "loc": { + "start": { + "line": 73, + "column": 15 + }, + "end": { + "line": 73, + "column": 20 + } + } + }, + "modifiers": [], + "range": [ + 1663, + 1671 + ], + "loc": { + "start": { + "line": 73, + "column": 12 + }, + "end": { + "line": 73, + "column": 20 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1687, + 1691 + ], + "loc": { + "start": { + "line": 73, + "column": 36 + }, + "end": { + "line": 73, + "column": 40 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1680, + 1686 + ], + "loc": { + "start": { + "line": 73, + "column": 29 + }, + "end": { + "line": 73, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 1680, + 1692 + ], + "loc": { + "start": { + "line": 73, + "column": 29 + }, + "end": { + "line": 73, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 1674, + 1692 + ], + "loc": { + "start": { + "line": 73, + "column": 23 + }, + "end": { + "line": 73, + "column": 41 + } + } + }, + "range": [ + 1663, + 1694 + ], + "loc": { + "start": { + "line": 73, + "column": 12 + }, + "end": { + "line": 73, + "column": 43 + } + } + } + ], + "selfClosing": false, + "range": [ + 1655, + 1695 + ], + "loc": { + "start": { + "line": 73, + "column": 4 + }, + "end": { + "line": 73, + "column": 44 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "remove", + "range": [ + 1695, + 1701 + ], + "loc": { + "start": { + "line": 73, + "column": 44 + }, + "end": { + "line": 73, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1701, + 1710 + ], + "loc": { + "start": { + "line": 73, + "column": 50 + }, + "end": { + "line": 73, + "column": 59 + } + } + }, + "range": [ + 1655, + 1710 + ], + "loc": { + "start": { + "line": 73, + "column": 4 + }, + "end": { + "line": 73, + "column": 59 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 1710, + 1714 + ], + "loc": { + "start": { + "line": 73, + "column": 59 + }, + "end": { + "line": 74, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1714, + 1722 + ], + "loc": { + "start": { + "line": 74, + "column": 3 + }, + "end": { + "line": 74, + "column": 11 + } + } + }, + "range": [ + 1472, + 1722 + ], + "loc": { + "start": { + "line": 66, + "column": 3 + }, + "end": { + "line": 74, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 1416, + 1732 + ], + "loc": { + "start": { + "line": 65, + "column": 2 + }, + "end": { + "line": 75, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1459, + 1463 + ], + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1502, + 1506 + ], + "loc": { + "start": { + "line": 67, + "column": 23 + }, + "end": { + "line": 67, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1534, + 1538 + ], + "loc": { + "start": { + "line": 68, + "column": 21 + }, + "end": { + "line": 68, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1614, + 1618 + ], + "loc": { + "start": { + "line": 71, + "column": 47 + }, + "end": { + "line": 71, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1633, + 1637 + ], + "loc": { + "start": { + "line": 72, + "column": 5 + }, + "end": { + "line": 72, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1687, + 1691 + ], + "loc": { + "start": { + "line": 73, + "column": 36 + }, + "end": { + "line": 73, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1459, + 1463 + ], + "loc": { + "start": { + "line": 65, + "column": 45 + }, + "end": { + "line": 65, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1502, + 1506 + ], + "loc": { + "start": { + "line": 67, + "column": 23 + }, + "end": { + "line": 67, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1486, + 1493 + ], + "loc": { + "start": { + "line": 67, + "column": 7 + }, + "end": { + "line": 67, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1534, + 1538 + ], + "loc": { + "start": { + "line": 68, + "column": 21 + }, + "end": { + "line": 68, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1521, + 1525 + ], + "loc": { + "start": { + "line": 68, + "column": 8 + }, + "end": { + "line": 68, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1633, + 1637 + ], + "loc": { + "start": { + "line": 72, + "column": 5 + }, + "end": { + "line": 72, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1609, + 1613 + ], + "loc": { + "start": { + "line": 71, + "column": 42 + }, + "end": { + "line": 71, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1614, + 1618 + ], + "loc": { + "start": { + "line": 71, + "column": 47 + }, + "end": { + "line": 71, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1609, + 1613 + ], + "loc": { + "start": { + "line": 71, + "column": 42 + }, + "end": { + "line": 71, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1614, + 1618 + ], + "loc": { + "start": { + "line": 71, + "column": 47 + }, + "end": { + "line": 71, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1680, + 1686 + ], + "loc": { + "start": { + "line": 73, + "column": 29 + }, + "end": { + "line": 73, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1687, + 1691 + ], + "loc": { + "start": { + "line": 73, + "column": 36 + }, + "end": { + "line": 73, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1680, + 1686 + ], + "loc": { + "start": { + "line": 73, + "column": 29 + }, + "end": { + "line": 73, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1687, + 1691 + ], + "loc": { + "start": { + "line": 73, + "column": 36 + }, + "end": { + "line": 73, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1453, + 1457 + ], + "loc": { + "start": { + "line": 65, + "column": 39 + }, + "end": { + "line": 65, + "column": 43 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1486, + 1493 + ], + "loc": { + "start": { + "line": 67, + "column": 7 + }, + "end": { + "line": 67, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1521, + 1525 + ], + "loc": { + "start": { + "line": 68, + "column": 8 + }, + "end": { + "line": 68, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 12 + }, + "end": { + "line": 69, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1609, + 1613 + ], + "loc": { + "start": { + "line": 71, + "column": 42 + }, + "end": { + "line": 71, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1680, + 1686 + ], + "loc": { + "start": { + "line": 73, + "column": 29 + }, + "end": { + "line": 73, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1801, + 1802 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 1801, + 1802 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1806, + 1807 + ], + "loc": { + "start": { + "line": 80, + "column": 27 + }, + "end": { + "line": 80, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1808, + 1812 + ], + "loc": { + "start": { + "line": 80, + "column": 29 + }, + "end": { + "line": 80, + "column": 33 + } + } + }, + "range": [ + 1806, + 1812 + ], + "loc": { + "start": { + "line": 80, + "column": 27 + }, + "end": { + "line": 80, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1801, + 1802 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 23 + } + } + } + ], + "range": [ + 1801, + 1812 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1806, + 1807 + ], + "loc": { + "start": { + "line": 80, + "column": 27 + }, + "end": { + "line": 80, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1801, + 1802 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1806, + 1807 + ], + "loc": { + "start": { + "line": 80, + "column": 27 + }, + "end": { + "line": 80, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1801, + 1802 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1806, + 1807 + ], + "loc": { + "start": { + "line": 80, + "column": 27 + }, + "end": { + "line": 80, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1808, + 1812 + ], + "loc": { + "start": { + "line": 80, + "column": 29 + }, + "end": { + "line": 80, + "column": 33 + } + } + }, + "range": [ + 1806, + 1812 + ], + "loc": { + "start": { + "line": 80, + "column": 27 + }, + "end": { + "line": 80, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1801, + 1802 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 23 + } + } + } + ], + "range": [ + 1801, + 1812 + ], + "loc": { + "start": { + "line": 80, + "column": 22 + }, + "end": { + "line": 80, + "column": 33 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1788, + 1793 + ], + "loc": { + "start": { + "line": 80, + "column": 9 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1794, + 1800 + ], + "loc": { + "start": { + "line": 80, + "column": 15 + }, + "end": { + "line": 80, + "column": 21 + } + } + }, + "range": [ + 1788, + 1800 + ], + "loc": { + "start": { + "line": 80, + "column": 9 + }, + "end": { + "line": 80, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 1788, + 1813 + ], + "loc": { + "start": { + "line": 80, + "column": 9 + }, + "end": { + "line": 80, + "column": 34 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + }, + "index": null, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1823, + 1827 + ], + "loc": { + "start": { + "line": 80, + "column": 44 + }, + "end": { + "line": 80, + "column": 48 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1828, + 1830 + ], + "loc": { + "start": { + "line": 80, + "column": 49 + }, + "end": { + "line": 80, + "column": 51 + } + } + }, + "range": [ + 1823, + 1830 + ], + "loc": { + "start": { + "line": 80, + "column": 44 + }, + "end": { + "line": 80, + "column": 51 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "label", + "range": [ + 1837, + 1842 + ], + "loc": { + "start": { + "line": 81, + "column": 4 + }, + "end": { + "line": 81, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 1847, + 1852 + ], + "loc": { + "start": { + "line": 82, + "column": 4 + }, + "end": { + "line": 82, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "done", + "range": [ + 1854, + 1858 + ], + "loc": { + "start": { + "line": 82, + "column": 11 + }, + "end": { + "line": 82, + "column": 15 + } + } + } + ], + "range": [ + 1847, + 1859 + ], + "loc": { + "start": { + "line": 82, + "column": 4 + }, + "end": { + "line": 82, + "column": 16 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "receive", + "range": [ + 1867, + 1874 + ], + "loc": { + "start": { + "line": 83, + "column": 7 + }, + "end": { + "line": 83, + "column": 14 + } + } + }, + "modifiers": [], + "range": [ + 1864, + 1874 + ], + "loc": { + "start": { + "line": 83, + "column": 4 + }, + "end": { + "line": 83, + "column": 14 + } + } + }, + "intro": true, + "outro": false, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1878, + 1881 + ], + "loc": { + "start": { + "line": 83, + "column": 18 + }, + "end": { + "line": 83, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1883, + 1887 + ], + "loc": { + "start": { + "line": 83, + "column": 23 + }, + "end": { + "line": 83, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1888, + 1890 + ], + "loc": { + "start": { + "line": 83, + "column": 28 + }, + "end": { + "line": 83, + "column": 30 + } + } + }, + "range": [ + 1883, + 1890 + ], + "loc": { + "start": { + "line": 83, + "column": 23 + }, + "end": { + "line": 83, + "column": 30 + } + } + }, + "range": [ + 1878, + 1890 + ], + "loc": { + "start": { + "line": 83, + "column": 18 + }, + "end": { + "line": 83, + "column": 30 + } + } + } + ], + "range": [ + 1877, + 1891 + ], + "loc": { + "start": { + "line": 83, + "column": 17 + }, + "end": { + "line": 83, + "column": 31 + } + } + }, + "range": [ + 1864, + 1893 + ], + "loc": { + "start": { + "line": 83, + "column": 4 + }, + "end": { + "line": 83, + "column": 33 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "send", + "range": [ + 1902, + 1906 + ], + "loc": { + "start": { + "line": 84, + "column": 8 + }, + "end": { + "line": 84, + "column": 12 + } + } + }, + "modifiers": [], + "range": [ + 1898, + 1906 + ], + "loc": { + "start": { + "line": 84, + "column": 4 + }, + "end": { + "line": 84, + "column": 12 + } + } + }, + "intro": false, + "outro": true, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1910, + 1913 + ], + "loc": { + "start": { + "line": 84, + "column": 16 + }, + "end": { + "line": 84, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1915, + 1919 + ], + "loc": { + "start": { + "line": 84, + "column": 21 + }, + "end": { + "line": 84, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1920, + 1922 + ], + "loc": { + "start": { + "line": 84, + "column": 26 + }, + "end": { + "line": 84, + "column": 28 + } + } + }, + "range": [ + 1915, + 1922 + ], + "loc": { + "start": { + "line": 84, + "column": 21 + }, + "end": { + "line": 84, + "column": 28 + } + } + }, + "range": [ + 1910, + 1922 + ], + "loc": { + "start": { + "line": 84, + "column": 16 + }, + "end": { + "line": 84, + "column": 28 + } + } + } + ], + "range": [ + 1909, + 1923 + ], + "loc": { + "start": { + "line": 84, + "column": 15 + }, + "end": { + "line": 84, + "column": 29 + } + } + }, + "range": [ + 1898, + 1925 + ], + "loc": { + "start": { + "line": 84, + "column": 4 + }, + "end": { + "line": 84, + "column": 31 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Animation", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "flip", + "range": [ + 1938, + 1942 + ], + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 1930, + 1942 + ], + "loc": { + "start": { + "line": 85, + "column": 4 + }, + "end": { + "line": 85, + "column": 16 + } + } + }, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 1946, + 1954 + ], + "loc": { + "start": { + "line": 85, + "column": 20 + }, + "end": { + "line": 85, + "column": 28 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 1956, + 1959 + ], + "loc": { + "start": { + "line": 85, + "column": 30 + }, + "end": { + "line": 85, + "column": 33 + } + } + }, + "range": [ + 1946, + 1959 + ], + "loc": { + "start": { + "line": 85, + "column": 20 + }, + "end": { + "line": 85, + "column": 33 + } + } + } + ], + "range": [ + 1945, + 1960 + ], + "loc": { + "start": { + "line": 85, + "column": 19 + }, + "end": { + "line": 85, + "column": 34 + } + } + }, + "range": [ + 1930, + 1962 + ], + "loc": { + "start": { + "line": 85, + "column": 4 + }, + "end": { + "line": 85, + "column": 36 + } + } + } + ], + "selfClosing": false, + "range": [ + 1836, + 1967 + ], + "loc": { + "start": { + "line": 81, + "column": 3 + }, + "end": { + "line": 86, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1967, + 1972 + ], + "loc": { + "start": { + "line": 86, + "column": 4 + }, + "end": { + "line": 87, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 1973, + 1978 + ], + "loc": { + "start": { + "line": 87, + "column": 5 + }, + "end": { + "line": 87, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "type", + "range": [ + 1979, + 1983 + ], + "loc": { + "start": { + "line": 87, + "column": 11 + }, + "end": { + "line": 87, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "checkbox", + "range": [ + 1984, + 1992 + ], + "loc": { + "start": { + "line": 87, + "column": 16 + }, + "end": { + "line": 87, + "column": 24 + } + } + } + ], + "range": [ + 1979, + 1992 + ], + "loc": { + "start": { + "line": 87, + "column": 11 + }, + "end": { + "line": 87, + "column": 24 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "checked", + "range": [ + 1993, + 2000 + ], + "loc": { + "start": { + "line": 87, + "column": 25 + }, + "end": { + "line": 87, + "column": 32 + } + } + }, + "boolean": true, + "value": [], + "range": [ + 1993, + 2000 + ], + "loc": { + "start": { + "line": 87, + "column": 25 + }, + "end": { + "line": 87, + "column": 32 + } + } + }, + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "change", + "range": [ + 2004, + 2010 + ], + "loc": { + "start": { + "line": 87, + "column": 36 + }, + "end": { + "line": 87, + "column": 42 + } + } + }, + "modifiers": [], + "range": [ + 2001, + 2010 + ], + "loc": { + "start": { + "line": 87, + "column": 33 + }, + "end": { + "line": 87, + "column": 42 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 2023, + 2027 + ], + "loc": { + "start": { + "line": 87, + "column": 55 + }, + "end": { + "line": 87, + "column": 59 + } + } + }, + { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 2029, + 2034 + ], + "loc": { + "start": { + "line": 87, + "column": 61 + }, + "end": { + "line": 87, + "column": 66 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "mark", + "range": [ + 2018, + 2022 + ], + "loc": { + "start": { + "line": 87, + "column": 50 + }, + "end": { + "line": 87, + "column": 54 + } + } + }, + "optional": false, + "range": [ + 2018, + 2035 + ], + "loc": { + "start": { + "line": 87, + "column": 50 + }, + "end": { + "line": 87, + "column": 67 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 2012, + 2035 + ], + "loc": { + "start": { + "line": 87, + "column": 44 + }, + "end": { + "line": 87, + "column": 67 + } + } + }, + "range": [ + 2001, + 2036 + ], + "loc": { + "start": { + "line": 87, + "column": 33 + }, + "end": { + "line": 87, + "column": 68 + } + } + } + ], + "selfClosing": false, + "range": [ + 1972, + 2037 + ], + "loc": { + "start": { + "line": 87, + "column": 4 + }, + "end": { + "line": 87, + "column": 69 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 1972, + 2037 + ], + "loc": { + "start": { + "line": 87, + "column": 4 + }, + "end": { + "line": 87, + "column": 69 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 2037, + 2042 + ], + "loc": { + "start": { + "line": 87, + "column": 69 + }, + "end": { + "line": 88, + "column": 4 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 2043, + 2047 + ], + "loc": { + "start": { + "line": 88, + "column": 5 + }, + "end": { + "line": 88, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "description", + "range": [ + 2048, + 2059 + ], + "loc": { + "start": { + "line": 88, + "column": 10 + }, + "end": { + "line": 88, + "column": 21 + } + } + }, + "range": [ + 2043, + 2059 + ], + "loc": { + "start": { + "line": 88, + "column": 5 + }, + "end": { + "line": 88, + "column": 21 + } + } + }, + "range": [ + 2042, + 2060 + ], + "loc": { + "start": { + "line": 88, + "column": 4 + }, + "end": { + "line": 88, + "column": 22 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 2060, + 2065 + ], + "loc": { + "start": { + "line": 88, + "column": 22 + }, + "end": { + "line": 89, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 2066, + 2072 + ], + "loc": { + "start": { + "line": 89, + "column": 5 + }, + "end": { + "line": 89, + "column": 11 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 2076, + 2081 + ], + "loc": { + "start": { + "line": 89, + "column": 15 + }, + "end": { + "line": 89, + "column": 20 + } + } + }, + "modifiers": [], + "range": [ + 2073, + 2081 + ], + "loc": { + "start": { + "line": 89, + "column": 12 + }, + "end": { + "line": 89, + "column": 20 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 2097, + 2101 + ], + "loc": { + "start": { + "line": 89, + "column": 36 + }, + "end": { + "line": 89, + "column": 40 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 2090, + 2096 + ], + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 2090, + 2102 + ], + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 2084, + 2102 + ], + "loc": { + "start": { + "line": 89, + "column": 23 + }, + "end": { + "line": 89, + "column": 41 + } + } + }, + "range": [ + 2073, + 2104 + ], + "loc": { + "start": { + "line": 89, + "column": 12 + }, + "end": { + "line": 89, + "column": 43 + } + } + } + ], + "selfClosing": false, + "range": [ + 2065, + 2105 + ], + "loc": { + "start": { + "line": 89, + "column": 4 + }, + "end": { + "line": 89, + "column": 44 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "remove", + "range": [ + 2105, + 2111 + ], + "loc": { + "start": { + "line": 89, + "column": 44 + }, + "end": { + "line": 89, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 2111, + 2120 + ], + "loc": { + "start": { + "line": 89, + "column": 50 + }, + "end": { + "line": 89, + "column": 59 + } + } + }, + "range": [ + 2065, + 2120 + ], + "loc": { + "start": { + "line": 89, + "column": 4 + }, + "end": { + "line": 89, + "column": 59 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 2120, + 2124 + ], + "loc": { + "start": { + "line": 89, + "column": 59 + }, + "end": { + "line": 90, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 2124, + 2132 + ], + "loc": { + "start": { + "line": 90, + "column": 3 + }, + "end": { + "line": 90, + "column": 11 + } + } + }, + "range": [ + 1836, + 2132 + ], + "loc": { + "start": { + "line": 81, + "column": 3 + }, + "end": { + "line": 90, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 1781, + 2142 + ], + "loc": { + "start": { + "line": 80, + "column": 2 + }, + "end": { + "line": 91, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1823, + 1827 + ], + "loc": { + "start": { + "line": 80, + "column": 44 + }, + "end": { + "line": 80, + "column": 48 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1883, + 1887 + ], + "loc": { + "start": { + "line": 83, + "column": 23 + }, + "end": { + "line": 83, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1915, + 1919 + ], + "loc": { + "start": { + "line": 84, + "column": 21 + }, + "end": { + "line": 84, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2023, + 2027 + ], + "loc": { + "start": { + "line": 87, + "column": 55 + }, + "end": { + "line": 87, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2043, + 2047 + ], + "loc": { + "start": { + "line": 88, + "column": 5 + }, + "end": { + "line": 88, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2097, + 2101 + ], + "loc": { + "start": { + "line": 89, + "column": 36 + }, + "end": { + "line": 89, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1823, + 1827 + ], + "loc": { + "start": { + "line": 80, + "column": 44 + }, + "end": { + "line": 80, + "column": 48 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1883, + 1887 + ], + "loc": { + "start": { + "line": 83, + "column": 23 + }, + "end": { + "line": 83, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1867, + 1874 + ], + "loc": { + "start": { + "line": 83, + "column": 7 + }, + "end": { + "line": 83, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1915, + 1919 + ], + "loc": { + "start": { + "line": 84, + "column": 21 + }, + "end": { + "line": 84, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1902, + 1906 + ], + "loc": { + "start": { + "line": 84, + "column": 8 + }, + "end": { + "line": 84, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 1938, + 1942 + ], + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2043, + 2047 + ], + "loc": { + "start": { + "line": 88, + "column": 5 + }, + "end": { + "line": 88, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 2018, + 2022 + ], + "loc": { + "start": { + "line": 87, + "column": 50 + }, + "end": { + "line": 87, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2023, + 2027 + ], + "loc": { + "start": { + "line": 87, + "column": 55 + }, + "end": { + "line": 87, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 2018, + 2022 + ], + "loc": { + "start": { + "line": 87, + "column": 50 + }, + "end": { + "line": 87, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2023, + 2027 + ], + "loc": { + "start": { + "line": 87, + "column": 55 + }, + "end": { + "line": 87, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 2090, + 2096 + ], + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2097, + 2101 + ], + "loc": { + "start": { + "line": 89, + "column": 36 + }, + "end": { + "line": 89, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 2090, + 2096 + ], + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 2097, + 2101 + ], + "loc": { + "start": { + "line": 89, + "column": 36 + }, + "end": { + "line": 89, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1817, + 1821 + ], + "loc": { + "start": { + "line": 80, + "column": 38 + }, + "end": { + "line": 80, + "column": 42 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1867, + 1874 + ], + "loc": { + "start": { + "line": 83, + "column": 7 + }, + "end": { + "line": 83, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 155, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1902, + 1906 + ], + "loc": { + "start": { + "line": 84, + "column": 8 + }, + "end": { + "line": 84, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 149, + 153 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flip", + "range": [ + 1938, + 1942 + ], + "loc": { + "start": { + "line": 85, + "column": 12 + }, + "end": { + "line": 85, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flip", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 2018, + 2022 + ], + "loc": { + "start": { + "line": 87, + "column": 50 + }, + "end": { + "line": 87, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1153, + 1157 + ], + "loc": { + "start": { + "line": 50, + "column": 10 + }, + "end": { + "line": 50, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 2090, + 2096 + ], + "loc": { + "start": { + "line": 89, + "column": 29 + }, + "end": { + "line": 89, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1083, + 1089 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 16 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 195, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 260, + 276 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json new file mode 100644 index 00000000..22c39e5a --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json @@ -0,0 +1,1890 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onDestroy", + "identifiers": [ + { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "local": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 322, + 331 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 266, + 271 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 375, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ] + }, + { + "name": "Incrementer", + "identifiers": [ + { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 92, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 92, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 92, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 92, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 390, + 401 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 92, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "Decrementer", + "identifiers": [ + { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 141, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 141, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 141, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 141, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 405, + 416 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 141, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ] + }, + { + "name": "Resetter", + "identifiers": [ + { + "type": "Identifier", + "name": "Resetter", + "range": [ + 190, + 198 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 190, + 198 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 190, + 198 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 190, + 198 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 420, + 428 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 190, + 198 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ] + }, + { + "name": "count_value", + "identifiers": [ + { + "type": "Identifier", + "name": "count_value", + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count_value", + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count_value", + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "init": null, + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 295, + 306 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + } + ] + }, + { + "name": "unsubscribe", + "identifiers": [ + { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count_value", + "range": [ + 295, + 306 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [ + 309, + 314 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "range": [ + 295, + 315 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 22 + } + } + } + ], + "range": [ + 291, + 318 + ], + "loc": { + "start": { + "line": 10, + "column": 46 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 282, + 287 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 10, + "column": 42 + } + } + } + ], + "range": [ + 282, + 318 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 12, + "column": 2 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "count", + "range": [ + 266, + 271 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "subscribe", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "range": [ + 266, + 281 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 266, + 319 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [ + 252, + 319 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 12, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 332, + 343 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 266, + 271 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 322, + 331 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 332, + 343 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 252, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 375, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 390, + 401 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 92, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 405, + 416 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 141, + 152 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 420, + 428 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 190, + 198 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 282, + 287 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 10, + "column": 42 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 282, + 287 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 10, + "column": 42 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count_value", + "range": [ + 295, + 306 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [ + 309, + 314 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "range": [ + 295, + 315 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 22 + } + } + } + ], + "range": [ + 291, + 318 + ], + "loc": { + "start": { + "line": 10, + "column": 46 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 282, + 287 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 10, + "column": 42 + } + } + } + ], + "range": [ + 282, + 318 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 12, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 309, + 314 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 282, + 287 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 10, + "column": 42 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 295, + 306 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 309, + 314 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 282, + 287 + ], + "loc": { + "start": { + "line": 10, + "column": 37 + }, + "end": { + "line": 10, + "column": 42 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 295, + 306 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 231, + 242 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json new file mode 100644 index 00000000..f49f0151 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json @@ -0,0 +1,5217 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "getRandomNumber", + "identifiers": [ + { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": true, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "tutorial/random-number", + "raw": "tutorial/random-number" + }, + "range": [ + 71, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 50 + } + } + } + ], + "range": [ + 71, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 50 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "fetch", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 65, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + "range": [ + 59, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + "range": [ + 53, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 51 + } + } + } + ], + "range": [ + 47, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 52 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "init": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "res", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 123, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "range": [ + 119, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 119, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "range": [ + 113, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "range": [ + 106, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 100, + 130 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "IfStatement", + "alternate": { + "type": "BlockStatement", + "body": [ + { + "type": "ThrowStatement", + "argument": { + "type": "NewExpression", + "arguments": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 194, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Error", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "range": [ + 184, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "range": [ + 178, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 25 + } + } + } + ], + "range": [ + 173, + 204 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "range": [ + 151, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + ], + "range": [ + 146, + 167 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + "test": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "res", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "ok", + "range": [ + 142, + 144 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 138, + 144 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 134, + 204 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 10, + "column": 3 + } + } + } + ], + "range": [ + 43, + 207 + ], + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "params": [], + "range": [ + 10, + 207 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 224, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 282, + 297 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "name": "promise", + "identifiers": [ + { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 224, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 224, + 241 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "range": [ + 214, + 241 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 272, + 279 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 420, + 427 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 570, + 577 + ], + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 637, + 644 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 719, + 726 + ], + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 41, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 254, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 254, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "promise", + "range": [ + 272, + 279 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 282, + 297 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 282, + 299 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "range": [ + 272, + 299 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "range": [ + 272, + 300 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 30 + } + } + } + ], + "range": [ + 268, + 303 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 254, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "params": [], + "range": [ + 245, + 303 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 17, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 333, + 344 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 254, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 224, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 333, + 344 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 254, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 420, + 427 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 570, + 577 + ], + "loc": { + "start": { + "line": 33, + "column": 8 + }, + "end": { + "line": 33, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 637, + 644 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 719, + 726 + ], + "loc": { + "start": { + "line": 41, + "column": 8 + }, + "end": { + "line": 41, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "res", + "identifiers": [ + { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "tutorial/random-number", + "raw": "tutorial/random-number" + }, + "range": [ + 71, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 50 + } + } + } + ], + "range": [ + 71, + 95 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 50 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "fetch", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 65, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + "range": [ + 59, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 51 + } + } + }, + "range": [ + 53, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 51 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "init": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "res", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 123, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "range": [ + 119, + 127 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 119, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "range": [ + 113, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "range": [ + 106, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 194, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 119, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 158, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 194, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 194, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 106, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 272, + 279 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 282, + 297 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "promise", + "range": [ + 272, + 279 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "promise", + "range": [ + 214, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 282, + 297 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getRandomNumber", + "range": [ + 25, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "number", + "identifiers": [ + { + "type": "Identifier", + "name": "number", + "range": [ + 455, + 461 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "number", + "range": [ + 455, + 461 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": false, + "value": { + "type": "Identifier", + "name": "number", + "range": [ + 455, + 461 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 462, + 464 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 465, + 466 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 464, + 467 + ], + "loc": { + "start": { + "line": 28, + "column": 1 + }, + "end": { + "line": 28, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "The number is ", + "range": [ + 467, + 481 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "number", + "range": [ + 482, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "range": [ + 481, + 489 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 489, + 493 + ], + "loc": { + "start": { + "line": 28, + "column": 26 + }, + "end": { + "line": 28, + "column": 30 + } + } + }, + "range": [ + 464, + 493 + ], + "loc": { + "start": { + "line": 28, + "column": 1 + }, + "end": { + "line": 28, + "column": 30 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 493, + 494 + ], + "loc": { + "start": { + "line": 28, + "column": 30 + }, + "end": { + "line": 29, + "column": 0 + } + } + } + ], + "range": [ + 448, + 494 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 482, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 455, + 461 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "number", + "range": [ + 482, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "number", + "range": [ + 455, + 461 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 508, + 510 + ], + "loc": { + "start": { + "line": 29, + "column": 14 + }, + "end": { + "line": 30, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 513, + 518 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 520, + 530 + ], + "loc": { + "start": { + "line": 30, + "column": 11 + }, + "end": { + "line": 30, + "column": 21 + } + } + } + ], + "range": [ + 513, + 531 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 510, + 532 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 533, + 538 + ], + "loc": { + "start": { + "line": 30, + "column": 24 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 539, + 546 + ], + "loc": { + "start": { + "line": 30, + "column": 30 + }, + "end": { + "line": 30, + "column": 37 + } + } + }, + "range": [ + 533, + 546 + ], + "loc": { + "start": { + "line": 30, + "column": 24 + }, + "end": { + "line": 30, + "column": 37 + } + } + }, + "range": [ + 532, + 547 + ], + "loc": { + "start": { + "line": 30, + "column": 23 + }, + "end": { + "line": 30, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 547, + 551 + ], + "loc": { + "start": { + "line": 30, + "column": 38 + }, + "end": { + "line": 30, + "column": 42 + } + } + }, + "range": [ + 510, + 551 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 551, + 552 + ], + "loc": { + "start": { + "line": 30, + "column": 42 + }, + "end": { + "line": 31, + "column": 0 + } + } + } + ], + "range": [ + 494, + 552 + ], + "loc": { + "start": { + "line": 29, + "column": 0 + }, + "end": { + "line": 31, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 533, + 538 + ], + "loc": { + "start": { + "line": 30, + "column": 24 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 533, + 538 + ], + "loc": { + "start": { + "line": 30, + "column": 24 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 583, + 588 + ], + "loc": { + "start": { + "line": 33, + "column": 21 + }, + "end": { + "line": 33, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 583, + 588 + ], + "loc": { + "start": { + "line": 33, + "column": 21 + }, + "end": { + "line": 33, + "column": 26 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 583, + 588 + ], + "loc": { + "start": { + "line": 33, + "column": 21 + }, + "end": { + "line": 33, + "column": 26 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 589, + 591 + ], + "loc": { + "start": { + "line": 33, + "column": 27 + }, + "end": { + "line": 34, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 592, + 593 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 34, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 591, + 594 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 34, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "the value is ", + "range": [ + 594, + 607 + ], + "loc": { + "start": { + "line": 34, + "column": 4 + }, + "end": { + "line": 34, + "column": 17 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "value", + "range": [ + 608, + 613 + ], + "loc": { + "start": { + "line": 34, + "column": 18 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "range": [ + 607, + 614 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 614, + 618 + ], + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 28 + } + } + }, + "range": [ + 591, + 618 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 34, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 618, + 619 + ], + "loc": { + "start": { + "line": 34, + "column": 28 + }, + "end": { + "line": 35, + "column": 0 + } + } + } + ], + "range": [ + 562, + 619 + ], + "loc": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 608, + 613 + ], + "loc": { + "start": { + "line": 34, + "column": 18 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 583, + 588 + ], + "loc": { + "start": { + "line": 33, + "column": 21 + }, + "end": { + "line": 33, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 608, + 613 + ], + "loc": { + "start": { + "line": 34, + "column": 18 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 583, + 588 + ], + "loc": { + "start": { + "line": 33, + "column": 21 + }, + "end": { + "line": 33, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 651, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 22 + }, + "end": { + "line": 37, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 651, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 22 + }, + "end": { + "line": 37, + "column": 27 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": true, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 651, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 22 + }, + "end": { + "line": 37, + "column": 27 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 657, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 28 + }, + "end": { + "line": 38, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 660, + 661 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 662, + 667 + ], + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 669, + 679 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 38, + "column": 21 + } + } + } + ], + "range": [ + 662, + 680 + ], + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 659, + 681 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 682, + 687 + ], + "loc": { + "start": { + "line": 38, + "column": 24 + }, + "end": { + "line": 38, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 688, + 695 + ], + "loc": { + "start": { + "line": 38, + "column": 30 + }, + "end": { + "line": 38, + "column": 37 + } + } + }, + "range": [ + 682, + 695 + ], + "loc": { + "start": { + "line": 38, + "column": 24 + }, + "end": { + "line": 38, + "column": 37 + } + } + }, + "range": [ + 681, + 696 + ], + "loc": { + "start": { + "line": 38, + "column": 23 + }, + "end": { + "line": 38, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 696, + 700 + ], + "loc": { + "start": { + "line": 38, + "column": 38 + }, + "end": { + "line": 38, + "column": 42 + } + } + }, + "range": [ + 659, + 700 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 700, + 701 + ], + "loc": { + "start": { + "line": 38, + "column": 42 + }, + "end": { + "line": 39, + "column": 0 + } + } + } + ], + "range": [ + 629, + 701 + ], + "loc": { + "start": { + "line": 37, + "column": 0 + }, + "end": { + "line": 39, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 682, + 687 + ], + "loc": { + "start": { + "line": 38, + "column": 24 + }, + "end": { + "line": 38, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 651, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 22 + }, + "end": { + "line": 37, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 682, + 687 + ], + "loc": { + "start": { + "line": 38, + "column": 24 + }, + "end": { + "line": 38, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 651, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 22 + }, + "end": { + "line": 37, + "column": 27 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 732, + 737 + ], + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 41, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 732, + 737 + ], + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 41, + "column": 26 + } + } + }, + "node": { + "type": "SvelteAwaitThenBlock", + "awaitThen": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 732, + 737 + ], + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 41, + "column": 26 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 738, + 740 + ], + "loc": { + "start": { + "line": 41, + "column": 27 + }, + "end": { + "line": 42, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 741, + 742 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 740, + 743 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "the value is ", + "range": [ + 743, + 756 + ], + "loc": { + "start": { + "line": 42, + "column": 4 + }, + "end": { + "line": 42, + "column": 17 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "value", + "range": [ + 757, + 762 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 23 + } + } + }, + "range": [ + 756, + 763 + ], + "loc": { + "start": { + "line": 42, + "column": 17 + }, + "end": { + "line": 42, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 763, + 767 + ], + "loc": { + "start": { + "line": 42, + "column": 24 + }, + "end": { + "line": 42, + "column": 28 + } + } + }, + "range": [ + 740, + 767 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 28 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 767, + 768 + ], + "loc": { + "start": { + "line": 42, + "column": 28 + }, + "end": { + "line": 43, + "column": 0 + } + } + } + ], + "range": [ + 711, + 768 + ], + "loc": { + "start": { + "line": 41, + "column": 0 + }, + "end": { + "line": 43, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 757, + 762 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 732, + 737 + ], + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 41, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 757, + 762 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 732, + 737 + ], + "loc": { + "start": { + "line": 41, + "column": 21 + }, + "end": { + "line": 41, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "error", + "identifiers": [ + { + "type": "Identifier", + "name": "error", + "range": [ + 776, + 781 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "error", + "range": [ + 776, + 781 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + }, + "node": { + "type": "SvelteAwaitCatchBlock", + "awaitCatch": false, + "error": { + "type": "Identifier", + "name": "error", + "range": [ + 776, + 781 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 782, + 784 + ], + "loc": { + "start": { + "line": 43, + "column": 14 + }, + "end": { + "line": 44, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 785, + 786 + ], + "loc": { + "start": { + "line": 44, + "column": 2 + }, + "end": { + "line": 44, + "column": 3 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 787, + 792 + ], + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 44, + "column": 9 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "color: red", + "range": [ + 794, + 804 + ], + "loc": { + "start": { + "line": 44, + "column": 11 + }, + "end": { + "line": 44, + "column": 21 + } + } + } + ], + "range": [ + 787, + 805 + ], + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 44, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 784, + 806 + ], + "loc": { + "start": { + "line": 44, + "column": 1 + }, + "end": { + "line": 44, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "error", + "range": [ + 807, + 812 + ], + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "message", + "range": [ + 813, + 820 + ], + "loc": { + "start": { + "line": 44, + "column": 30 + }, + "end": { + "line": 44, + "column": 37 + } + } + }, + "range": [ + 807, + 820 + ], + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 37 + } + } + }, + "range": [ + 806, + 821 + ], + "loc": { + "start": { + "line": 44, + "column": 23 + }, + "end": { + "line": 44, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 821, + 825 + ], + "loc": { + "start": { + "line": 44, + "column": 38 + }, + "end": { + "line": 44, + "column": 42 + } + } + }, + "range": [ + 784, + 825 + ], + "loc": { + "start": { + "line": 44, + "column": 1 + }, + "end": { + "line": 44, + "column": 42 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 825, + 826 + ], + "loc": { + "start": { + "line": 44, + "column": 42 + }, + "end": { + "line": 45, + "column": 0 + } + } + } + ], + "range": [ + 768, + 826 + ], + "loc": { + "start": { + "line": 43, + "column": 0 + }, + "end": { + "line": 45, + "column": 0 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 807, + 812 + ], + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 776, + 781 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "error", + "range": [ + 807, + 812 + ], + "loc": { + "start": { + "line": 44, + "column": 24 + }, + "end": { + "line": 44, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "error", + "range": [ + 776, + 781 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 65, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json new file mode 100644 index 00000000..7034920d --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json @@ -0,0 +1,14671 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onMount", + "identifiers": [ + { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "canvas", + "identifiers": [ + { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": null, + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 1079, + 1085 + ], + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 60, + 67 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 1079, + 1085 + ], + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "ctx", + "identifiers": [ + { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'2d'", + "value": "2d", + "range": [ + 108, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 36 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getContext", + "range": [ + 97, + 107 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "range": [ + 90, + 107 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 90, + 113 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "range": [ + 84, + 113 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 37 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 747, + 750 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ] + }, + { + "name": "frame", + "identifiers": [ + { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "loop", + "range": [ + 151, + 155 + ], + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 40 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 129, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 129, + 156 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "range": [ + 121, + 156 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 828, + 833 + ], + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + } + ] + }, + { + "name": "loop", + "identifiers": [ + { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "frame", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "loop", + "range": [ + 213, + 217 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 37 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "optional": false, + "range": [ + 191, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 38 + } + } + }, + "range": [ + 183, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 38 + } + } + }, + "range": [ + 183, + 219 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 39 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 38 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 41 + }, + "end": { + "line": 13, + "column": 42 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 13, + "column": 51 + }, + "end": { + "line": 13, + "column": 56 + } + } + }, + "range": [ + 265, + 277 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 56 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 286, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 65 + }, + "end": { + "line": 13, + "column": 71 + } + } + }, + "range": [ + 279, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 71 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "ctx", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getImageData", + "range": [ + 246, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "range": [ + 242, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "optional": false, + "range": [ + 242, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 72 + } + } + }, + "range": [ + 230, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 72 + } + } + } + ], + "range": [ + 224, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 73 + } + } + }, + { + "type": "ForStatement", + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "range": [ + 366, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "range": [ + 362, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 19 + } + } + } + ], + "range": [ + 356, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "operator": "%", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 398, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 391, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 387, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 383, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 30 + } + } + } + ], + "range": [ + 377, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 430, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 423, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 419, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "operator": ">>>", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 441, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 36 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 419, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 415, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 37 + } + } + } + ], + "range": [ + 409, + 443 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 38 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 459, + 461 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 465, + 468 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "range": [ + 465, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 482, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 37 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 475, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 465, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 459, + 488 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 43 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 492, + 494 + ], + "loc": { + "start": { + "line": 20, + "column": 47 + }, + "end": { + "line": 20, + "column": 49 + } + } + }, + "operator": "*", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 510, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 65 + }, + "end": { + "line": 20, + "column": 69 + } + } + }, + "range": [ + 506, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 69 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sin", + "range": [ + 502, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 57 + }, + "end": { + "line": 20, + "column": 60 + } + } + }, + "range": [ + 497, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 60 + } + } + }, + "optional": false, + "range": [ + 497, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 70 + } + } + }, + "range": [ + 492, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 47 + }, + "end": { + "line": 20, + "column": 70 + } + } + }, + "range": [ + 459, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 71 + } + } + }, + "range": [ + 455, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 71 + } + } + } + ], + "range": [ + 449, + 517 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 72 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 532, + 534 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 16 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 538, + 541 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 544, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 26 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "range": [ + 538, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 555, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 548, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 538, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 532, + 562 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 44 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 566, + 568 + ], + "loc": { + "start": { + "line": 21, + "column": 48 + }, + "end": { + "line": 21, + "column": 50 + } + } + }, + "operator": "*", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 584, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 66 + }, + "end": { + "line": 21, + "column": 70 + } + } + }, + "range": [ + 580, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 70 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "cos", + "range": [ + 576, + 579 + ], + "loc": { + "start": { + "line": 21, + "column": 58 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + "range": [ + 571, + 579 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + "optional": false, + "range": [ + 571, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 71 + } + } + }, + "range": [ + 566, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 48 + }, + "end": { + "line": 21, + "column": 71 + } + } + }, + "range": [ + 532, + 590 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 72 + } + } + }, + "range": [ + 528, + 590 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 72 + } + } + } + ], + "range": [ + 522, + 591 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 73 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 606, + 609 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 17 + } + } + }, + "range": [ + 602, + 609 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 17 + } + } + } + ], + "range": [ + 596, + 610 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 626, + 630 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + "range": [ + 616, + 630 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 631, + 632 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 635, + 636 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 24 + } + } + }, + "range": [ + 631, + 636 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 24 + } + } + }, + "range": [ + 616, + 637 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "r", + "range": [ + 640, + 641 + ], + "loc": { + "start": { + "line": 24, + "column": 28 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "range": [ + 616, + 641 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "range": [ + 616, + 642 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 647, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 657, + 661 + ], + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "range": [ + 647, + 661 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 662, + 663 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 666, + 667 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 24 + } + } + }, + "range": [ + 662, + 667 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 24 + } + } + }, + "range": [ + 647, + 668 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "g", + "range": [ + 671, + 672 + ], + "loc": { + "start": { + "line": 25, + "column": 28 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "range": [ + 647, + 672 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "range": [ + 647, + 673 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 678, + 687 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 688, + 692 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "range": [ + 678, + 692 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 697, + 698 + ], + "loc": { + "start": { + "line": 26, + "column": 23 + }, + "end": { + "line": 26, + "column": 24 + } + } + }, + "range": [ + 693, + 698 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 24 + } + } + }, + "range": [ + 678, + 699 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "b", + "range": [ + 702, + 703 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 29 + } + } + }, + "range": [ + 678, + 703 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 29 + } + } + }, + "range": [ + 678, + 704 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 30 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 709, + 718 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 719, + 723 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "range": [ + 709, + 723 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 724, + 725 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 728, + 729 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "range": [ + 724, + 729 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "range": [ + 709, + 730 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "255", + "value": 255, + "range": [ + 733, + 736 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "range": [ + 709, + 736 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "range": [ + 709, + 737 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 32 + } + } + } + ], + "range": [ + 350, + 742 + ], + "loc": { + "start": { + "line": 15, + "column": 54 + }, + "end": { + "line": 28, + "column": 4 + } + } + }, + "init": { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 312, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "range": [ + 308, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + ], + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "operator": "<", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 319, + 328 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 329, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + "range": [ + 319, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 38 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "range": [ + 319, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "range": [ + 315, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "update": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 342, + 343 + ], + "loc": { + "start": { + "line": 15, + "column": 46 + }, + "end": { + "line": 15, + "column": 47 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 51 + }, + "end": { + "line": 15, + "column": 52 + } + } + }, + "range": [ + 342, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 46 + }, + "end": { + "line": 15, + "column": 52 + } + } + }, + "range": [ + 299, + 742 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 28, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "imageData", + "range": [ + 764, + 773 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 775, + 776 + ], + "loc": { + "start": { + "line": 30, + "column": 31 + }, + "end": { + "line": 30, + "column": 32 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 778, + 779 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 35 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "ctx", + "range": [ + 747, + 750 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "putImageData", + "range": [ + 751, + 763 + ], + "loc": { + "start": { + "line": 30, + "column": 7 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + "range": [ + 747, + 763 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 747, + 780 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 36 + } + } + }, + "range": [ + 747, + 781 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 37 + } + } + } + ], + "range": [ + 178, + 785 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 31, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "range": [ + 161, + 785 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 31, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 151, + 155 + ], + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 213, + 217 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 129, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 151, + 155 + ], + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "frame", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "loop", + "range": [ + 213, + 217 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 37 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "optional": false, + "range": [ + 191, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 38 + } + } + }, + "range": [ + 183, + 218 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 38 + } + } + }, + "range": [ + 183, + 219 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 39 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 38 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 41 + }, + "end": { + "line": 13, + "column": 42 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 13, + "column": 51 + }, + "end": { + "line": 13, + "column": 56 + } + } + }, + "range": [ + 265, + 277 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 56 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 286, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 65 + }, + "end": { + "line": 13, + "column": 71 + } + } + }, + "range": [ + 279, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 71 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "ctx", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getImageData", + "range": [ + 246, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "range": [ + 242, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "optional": false, + "range": [ + 242, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 72 + } + } + }, + "range": [ + 230, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 72 + } + } + } + ], + "range": [ + 224, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 73 + } + } + }, + { + "type": "ForStatement", + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "range": [ + 366, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "range": [ + 362, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 19 + } + } + } + ], + "range": [ + 356, + 372 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "operator": "%", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 398, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 391, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 387, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 383, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 30 + } + } + } + ], + "range": [ + 377, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 430, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 423, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 419, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "operator": ">>>", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 441, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 36 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 419, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 415, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 37 + } + } + } + ], + "range": [ + 409, + 443 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 38 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 459, + 461 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 465, + 468 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "range": [ + 465, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 482, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 37 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 475, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 465, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 459, + 488 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 43 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 492, + 494 + ], + "loc": { + "start": { + "line": 20, + "column": 47 + }, + "end": { + "line": 20, + "column": 49 + } + } + }, + "operator": "*", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 510, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 65 + }, + "end": { + "line": 20, + "column": 69 + } + } + }, + "range": [ + 506, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 69 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sin", + "range": [ + 502, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 57 + }, + "end": { + "line": 20, + "column": 60 + } + } + }, + "range": [ + 497, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 60 + } + } + }, + "optional": false, + "range": [ + 497, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 70 + } + } + }, + "range": [ + 492, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 47 + }, + "end": { + "line": 20, + "column": 70 + } + } + }, + "range": [ + 459, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 71 + } + } + }, + "range": [ + 455, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 71 + } + } + } + ], + "range": [ + 449, + 517 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 72 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 532, + 534 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 16 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 538, + 541 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 544, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 26 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "range": [ + 538, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 555, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 548, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 538, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 532, + 562 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 44 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 566, + 568 + ], + "loc": { + "start": { + "line": 21, + "column": 48 + }, + "end": { + "line": 21, + "column": 50 + } + } + }, + "operator": "*", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 584, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 66 + }, + "end": { + "line": 21, + "column": 70 + } + } + }, + "range": [ + 580, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 70 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "cos", + "range": [ + 576, + 579 + ], + "loc": { + "start": { + "line": 21, + "column": 58 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + "range": [ + 571, + 579 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + "optional": false, + "range": [ + 571, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 71 + } + } + }, + "range": [ + 566, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 48 + }, + "end": { + "line": 21, + "column": 71 + } + } + }, + "range": [ + 532, + 590 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 72 + } + } + }, + "range": [ + 528, + 590 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 72 + } + } + } + ], + "range": [ + 522, + 591 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 73 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 606, + 609 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 17 + } + } + }, + "range": [ + 602, + 609 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 17 + } + } + } + ], + "range": [ + 596, + 610 + ], + "loc": { + "start": { + "line": 22, + "column": 4 + }, + "end": { + "line": 22, + "column": 18 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 626, + 630 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + "range": [ + 616, + 630 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 631, + 632 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 635, + 636 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 24 + } + } + }, + "range": [ + 631, + 636 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 24 + } + } + }, + "range": [ + 616, + 637 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "r", + "range": [ + 640, + 641 + ], + "loc": { + "start": { + "line": 24, + "column": 28 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "range": [ + 616, + 641 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "range": [ + 616, + 642 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 647, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 657, + 661 + ], + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "range": [ + 647, + 661 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 662, + 663 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 666, + 667 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 24 + } + } + }, + "range": [ + 662, + 667 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 24 + } + } + }, + "range": [ + 647, + 668 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "g", + "range": [ + 671, + 672 + ], + "loc": { + "start": { + "line": 25, + "column": 28 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "range": [ + 647, + 672 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "range": [ + 647, + 673 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 678, + 687 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 688, + 692 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "range": [ + 678, + 692 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 697, + 698 + ], + "loc": { + "start": { + "line": 26, + "column": 23 + }, + "end": { + "line": 26, + "column": 24 + } + } + }, + "range": [ + 693, + 698 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 24 + } + } + }, + "range": [ + 678, + 699 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "b", + "range": [ + 702, + 703 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 29 + } + } + }, + "range": [ + 678, + 703 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 29 + } + } + }, + "range": [ + 678, + 704 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 30 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 709, + 718 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 719, + 723 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "range": [ + 709, + 723 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 724, + 725 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 728, + 729 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "range": [ + 724, + 729 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "range": [ + 709, + 730 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "255", + "value": 255, + "range": [ + 733, + 736 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "range": [ + 709, + 736 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "range": [ + 709, + 737 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 32 + } + } + } + ], + "range": [ + 350, + 742 + ], + "loc": { + "start": { + "line": 15, + "column": 54 + }, + "end": { + "line": 28, + "column": 4 + } + } + }, + "init": { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 312, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "range": [ + 308, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + ], + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "operator": "<", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "imageData", + "range": [ + 319, + 328 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "data", + "range": [ + 329, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + "range": [ + 319, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 334, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 38 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "range": [ + 319, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "range": [ + 315, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 44 + } + } + }, + "update": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 342, + 343 + ], + "loc": { + "start": { + "line": 15, + "column": 46 + }, + "end": { + "line": 15, + "column": 47 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 51 + }, + "end": { + "line": 15, + "column": 52 + } + } + }, + "range": [ + 342, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 46 + }, + "end": { + "line": 15, + "column": 52 + } + } + }, + "range": [ + 299, + 742 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 28, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "imageData", + "range": [ + 764, + 773 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 775, + 776 + ], + "loc": { + "start": { + "line": 30, + "column": 31 + }, + "end": { + "line": 30, + "column": 32 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 778, + 779 + ], + "loc": { + "start": { + "line": 30, + "column": 34 + }, + "end": { + "line": 30, + "column": 35 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "ctx", + "range": [ + 747, + 750 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "putImageData", + "range": [ + 751, + 763 + ], + "loc": { + "start": { + "line": 30, + "column": 7 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + "range": [ + 747, + 763 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 747, + 780 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 36 + } + } + }, + "range": [ + 747, + 781 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 37 + } + } + } + ], + "range": [ + 178, + 785 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 31, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "range": [ + 161, + 785 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 31, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + } + ] + }, + { + "name": "imageData", + "identifiers": [ + { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 38 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 41 + }, + "end": { + "line": 13, + "column": 42 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 13, + "column": 51 + }, + "end": { + "line": 13, + "column": 56 + } + } + }, + "range": [ + 265, + 277 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 56 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 286, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 65 + }, + "end": { + "line": 13, + "column": 71 + } + } + }, + "range": [ + 279, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 71 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "ctx", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getImageData", + "range": [ + 246, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "range": [ + 242, + 258 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "optional": false, + "range": [ + 242, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 72 + } + } + }, + "range": [ + 230, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 72 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 319, + 328 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "from": "for", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 647, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 678, + 687 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 709, + 718 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 764, + 773 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 213, + 217 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 747, + 750 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 764, + 773 + ], + "loc": { + "start": { + "line": 30, + "column": 20 + }, + "end": { + "line": 30, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "for", + "variables": [ + { + "name": "p", + "identifiers": [ + { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 312, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "range": [ + 308, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "for", + "init": true, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "from": "for", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 342, + 343 + ], + "loc": { + "start": { + "line": 15, + "column": 46 + }, + "end": { + "line": 15, + "column": 47 + } + } + }, + "from": "for", + "init": false, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 631, + 632 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 662, + 663 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 724, + 725 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "for", + "init": true, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + "from": "for", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 319, + 328 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "from": "for", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 342, + 343 + ], + "loc": { + "start": { + "line": 15, + "column": 46 + }, + "end": { + "line": 15, + "column": 47 + } + } + }, + "from": "for", + "init": false, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [ + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "p", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "range": [ + 366, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "range": [ + 362, + 371 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + } + ] + }, + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "operator": "%", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 398, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 391, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 387, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 30 + } + } + }, + "range": [ + 383, + 403 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + } + ] + }, + { + "name": "y", + "identifiers": [ + { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 430, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 423, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 419, + 436 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "operator": ">>>", + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 441, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 36 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 419, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 415, + 442 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 37 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 544, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 26 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ] + }, + { + "name": "r", + "identifiers": [ + { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 459, + 461 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 465, + 468 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "x", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "range": [ + 465, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "width", + "range": [ + 482, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 37 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 475, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 465, + 487 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 42 + } + } + }, + "range": [ + 459, + 488 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 43 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 492, + 494 + ], + "loc": { + "start": { + "line": 20, + "column": 47 + }, + "end": { + "line": 20, + "column": 49 + } + } + }, + "operator": "*", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 510, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 65 + }, + "end": { + "line": 20, + "column": 69 + } + } + }, + "range": [ + 506, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 69 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sin", + "range": [ + 502, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 57 + }, + "end": { + "line": 20, + "column": 60 + } + } + }, + "range": [ + 497, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 60 + } + } + }, + "optional": false, + "range": [ + 497, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 70 + } + } + }, + "range": [ + 492, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 47 + }, + "end": { + "line": 20, + "column": 70 + } + } + }, + "range": [ + 459, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 71 + } + } + }, + "range": [ + 455, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 71 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 640, + 641 + ], + "loc": { + "start": { + "line": 24, + "column": 28 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + } + ] + }, + { + "name": "g", + "identifiers": [ + { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 532, + 534 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 16 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 538, + 541 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "y", + "range": [ + 544, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 26 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "range": [ + 538, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "operator": "/", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "height", + "range": [ + 555, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 548, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 538, + 561 + ], + "loc": { + "start": { + "line": 21, + "column": 20 + }, + "end": { + "line": 21, + "column": 43 + } + } + }, + "range": [ + 532, + 562 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 44 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "64", + "value": 64, + "range": [ + 566, + 568 + ], + "loc": { + "start": { + "line": 21, + "column": 48 + }, + "end": { + "line": 21, + "column": 50 + } + } + }, + "operator": "*", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 584, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 66 + }, + "end": { + "line": 21, + "column": 70 + } + } + }, + "range": [ + 580, + 588 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 70 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "cos", + "range": [ + 576, + 579 + ], + "loc": { + "start": { + "line": 21, + "column": 58 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + "range": [ + 571, + 579 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + "optional": false, + "range": [ + 571, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 71 + } + } + }, + "range": [ + 566, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 48 + }, + "end": { + "line": 21, + "column": 71 + } + } + }, + "range": [ + 532, + 590 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 72 + } + } + }, + "range": [ + 528, + 590 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 72 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "g", + "range": [ + 671, + 672 + ], + "loc": { + "start": { + "line": 25, + "column": 28 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "128", + "value": 128, + "range": [ + 606, + 609 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 17 + } + } + }, + "range": [ + 602, + 609 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 702, + 703 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 29 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 383, + 384 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 544, + 545 + ], + "loc": { + "start": { + "line": 21, + "column": 26 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 415, + 416 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 631, + 632 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "r", + "range": [ + 640, + 641 + ], + "loc": { + "start": { + "line": 24, + "column": 28 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "r", + "range": [ + 455, + 456 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 647, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 662, + 663 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "g", + "range": [ + 671, + 672 + ], + "loc": { + "start": { + "line": 25, + "column": 28 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "g", + "range": [ + 528, + 529 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 678, + 687 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 702, + 703 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 29 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 602, + 603 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 709, + 718 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 724, + 725 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 366, + 367 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 631, + 632 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 647, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 662, + 663 + ], + "loc": { + "start": { + "line": 25, + "column": 19 + }, + "end": { + "line": 25, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 678, + 687 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 693, + 694 + ], + "loc": { + "start": { + "line": 26, + "column": 19 + }, + "end": { + "line": 26, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 709, + 718 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "p", + "range": [ + 724, + 725 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "p", + "range": [ + 308, + 309 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 319, + 328 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "from": "for", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 61 + }, + "end": { + "line": 20, + "column": 62 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 21, + "column": 62 + }, + "end": { + "line": 21, + "column": 63 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 647, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 678, + 687 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "imageData", + "range": [ + 709, + 718 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imageData", + "range": [ + 230, + 239 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 18 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 213, + 217 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 170, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 242, + 245 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "ctx", + "range": [ + 747, + 750 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ctx", + "range": [ + 84, + 87 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 807, + 827 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 828, + 833 + ], + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 807, + 827 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 828, + 833 + ], + "loc": { + "start": { + "line": 34, + "column": 24 + }, + "end": { + "line": 34, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 121, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 90, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 129, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 279, + 285 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 64 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 391, + 397 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 423, + 429 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 475, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "canvas", + "range": [ + 548, + 554 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "canvas", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 807, + 827 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 129, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 807, + 827 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 129, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 191, + 212 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 497, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 52 + }, + "end": { + "line": 20, + "column": 56 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 571, + 575 + ], + "loc": { + "start": { + "line": 21, + "column": 53 + }, + "end": { + "line": 21, + "column": 57 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 807, + 827 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json new file mode 100644 index 00000000..3f484d38 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json @@ -0,0 +1,473 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "yes", + "identifiers": [ + { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 14, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 332, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 82, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "yes", + "range": [ + 332, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "yes", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json new file mode 100644 index 00000000..80dd0940 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json @@ -0,0 +1,458 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "big", + "identifiers": [ + { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 14, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 173, + 176 + ], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 161, + 164 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "big", + "range": [ + 173, + 176 + ], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "big", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json new file mode 100644 index 00000000..4cbabbe0 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json @@ -0,0 +1,846 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "current", + "identifiers": [ + { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "'foo'", + "value": "foo", + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 14, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 179, + 186 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 276, + 283 + ], + "loc": { + "start": { + "line": 22, + "column": 18 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 314, + 321 + ], + "loc": { + "start": { + "line": 23, + "column": 18 + }, + "end": { + "line": 23, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 364, + 371 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 420, + 427 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 179, + 186 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 276, + 283 + ], + "loc": { + "start": { + "line": 22, + "column": 18 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 364, + 371 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 314, + 321 + ], + "loc": { + "start": { + "line": 23, + "column": 18 + }, + "end": { + "line": 23, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 314, + 321 + ], + "loc": { + "start": { + "line": 23, + "column": 18 + }, + "end": { + "line": 23, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 420, + 427 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 420, + 427 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json new file mode 100644 index 00000000..4d4d4df8 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json @@ -0,0 +1,1533 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Keypad", + "identifiers": [ + { + "type": "Identifier", + "name": "Keypad", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "pin", + "identifiers": [ + { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "init": null, + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 174, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 215, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 272, + 275 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + }, + { + "name": "view", + "identifiers": [ + { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "ConditionalExpression", + "alternate": { + "type": "Literal", + "raw": "'enter your pin'", + "value": "enter your pin", + "range": [ + 107, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 48 + }, + "end": { + "line": 5, + "column": 64 + } + } + }, + "consequent": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "/\\d(?!$)/g", + "regex": { + "flags": "g", + "pattern": "\\d(?!$)" + }, + "value": "/\\d(?!$)/g", + "range": [ + 88, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + { + "type": "Literal", + "raw": "'•'", + "value": "•", + "range": [ + 100, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 41 + }, + "end": { + "line": 5, + "column": 44 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "pin", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "replace", + "range": [ + 80, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 28 + } + } + }, + "range": [ + 76, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 76, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 45 + } + } + }, + "test": { + "type": "Identifier", + "name": "pin", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 70, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 64 + } + } + }, + "range": [ + 63, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 64 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "view", + "range": [ + 240, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 44 + }, + "end": { + "line": 12, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "name": "handleSubmit", + "identifiers": [ + { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 136, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 136, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "pin", + "range": [ + 174, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "submitted ", + "raw": "submitted " + }, + "range": [ + 161, + 174 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 21 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 177, + 179 + ], + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 26 + } + } + } + ], + "range": [ + 161, + 179 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 26 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 155, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 155, + 180 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "range": [ + 155, + 181 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 28 + } + } + } + ], + "range": [ + 151, + 184 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 136, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "params": [], + "range": [ + 127, + 184 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 288, + 300 + ], + "loc": { + "start": { + "line": 14, + "column": 36 + }, + "end": { + "line": 14, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 136, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 215, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "view", + "range": [ + 240, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 44 + }, + "end": { + "line": 12, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "view", + "range": [ + 63, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 272, + 275 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 288, + 300 + ], + "loc": { + "start": { + "line": 14, + "column": 36 + }, + "end": { + "line": 14, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 136, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Keypad", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 155, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 174, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 155, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "pin", + "range": [ + 174, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pin", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 155, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 155, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json new file mode 100644 index 00000000..3949b715 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json @@ -0,0 +1,3244 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createEventDispatcher", + "identifiers": [ + { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "local": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 102, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 79, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 71, + 81 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 841, + 846 + ], + "loc": { + "start": { + "line": 37, + "column": 20 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 941, + 946 + ], + "loc": { + "start": { + "line": 39, + "column": 20 + }, + "end": { + "line": 39, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ] + }, + { + "name": "dispatch", + "identifiers": [ + { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 102, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "optional": false, + "range": [ + 102, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + "range": [ + 91, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ] + }, + { + "name": "select", + "identifiers": [ + { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "value", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "operator": "+=", + "right": { + "type": "Identifier", + "name": "num", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "range": [ + 157, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 151, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "range": [ + 144, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "range": [ + 135, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 470, + 476 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 511, + 517 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 552, + 558 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 593, + 599 + ], + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 634, + 640 + ], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 31, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 675, + 681 + ], + "loc": { + "start": { + "line": 32, + "column": 19 + }, + "end": { + "line": 32, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 716, + 722 + ], + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 757, + 763 + ], + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 798, + 804 + ], + "loc": { + "start": { + "line": 35, + "column": 19 + }, + "end": { + "line": 35, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 899, + 905 + ], + "loc": { + "start": { + "line": 38, + "column": 19 + }, + "end": { + "line": 38, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ] + }, + { + "name": "clear", + "identifiers": [ + { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "value", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 201, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "range": [ + 193, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 187, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "range": [ + 178, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "clear", + "range": [ + 858, + 863 + ], + "loc": { + "start": { + "line": 37, + "column": 37 + }, + "end": { + "line": 37, + "column": 42 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + } + ] + }, + { + "name": "submit", + "identifiers": [ + { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'submit'", + "value": "submit", + "range": [ + 236, + 244 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 39 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 227, + 245 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 221, + 245 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 40 + } + } + }, + "range": [ + 212, + 245 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "submit", + "range": [ + 958, + 964 + ], + "loc": { + "start": { + "line": 39, + "column": 37 + }, + "end": { + "line": 39, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 102, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 470, + 476 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 511, + 517 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 552, + 558 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 593, + 599 + ], + "loc": { + "start": { + "line": 30, + "column": 19 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 634, + 640 + ], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 31, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 675, + 681 + ], + "loc": { + "start": { + "line": 32, + "column": 19 + }, + "end": { + "line": 32, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 716, + 722 + ], + "loc": { + "start": { + "line": 33, + "column": 19 + }, + "end": { + "line": 33, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 757, + 763 + ], + "loc": { + "start": { + "line": 34, + "column": 19 + }, + "end": { + "line": 34, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 798, + 804 + ], + "loc": { + "start": { + "line": 35, + "column": 19 + }, + "end": { + "line": 35, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 841, + 846 + ], + "loc": { + "start": { + "line": 37, + "column": 20 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "clear", + "range": [ + 858, + 863 + ], + "loc": { + "start": { + "line": 37, + "column": 37 + }, + "end": { + "line": 37, + "column": 42 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "clear", + "range": [ + 178, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "select", + "range": [ + 899, + 905 + ], + "loc": { + "start": { + "line": 38, + "column": 19 + }, + "end": { + "line": 38, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "select", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 941, + 946 + ], + "loc": { + "start": { + "line": 39, + "column": 20 + }, + "end": { + "line": 39, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "submit", + "range": [ + 958, + 964 + ], + "loc": { + "start": { + "line": 39, + "column": 37 + }, + "end": { + "line": 39, + "column": 43 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "submit", + "range": [ + 212, + 218 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "num", + "identifiers": [ + { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "value", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "operator": "+=", + "right": { + "type": "Identifier", + "name": "num", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "range": [ + 157, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 151, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "range": [ + 144, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "num", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "num", + "range": [ + 144, + 147 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 91, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json new file mode 100644 index 00000000..2f6834ad --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json @@ -0,0 +1,1014 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Inner", + "identifiers": [ + { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handleMessage", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "range": [ + 88, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 88, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 82, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 82, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 78, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "range": [ + 48, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 141, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 141, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "range": [ + 88, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 88, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 82, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 82, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 78, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "range": [ + 48, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json new file mode 100644 index 00000000..802d02d1 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json @@ -0,0 +1,891 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createEventDispatcher", + "identifiers": [ + { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "local": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "name": "dispatch", + "identifiers": [ + { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "optional": false, + "range": [ + 77, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "range": [ + 66, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + }, + { + "name": "sayHello", + "identifiers": [ + { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'message'", + "value": "message", + "range": [ + 137, + 146 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 153, + 157 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Hello!'", + "value": "Hello!", + "range": [ + 159, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "range": [ + 153, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 17 + } + } + } + ], + "range": [ + 148, + 171 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 128, + 172 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "range": [ + 128, + 173 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 9, + "column": 5 + } + } + } + ], + "range": [ + 124, + 176 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "params": [], + "range": [ + 104, + 176 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json new file mode 100644 index 00000000..ecba3001 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json @@ -0,0 +1,8849 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onMount", + "identifiers": [ + { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 338, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "characters", + "identifiers": [ + { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'🥳'", + "value": "🥳", + "range": [ + 64, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Literal", + "raw": "'🎉'", + "value": "🎉", + "range": [ + 70, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + { + "type": "Literal", + "raw": "'✨'", + "value": "✨", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "range": [ + 63, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 50, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 167, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 182, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + }, + { + "name": "confetti", + "identifiers": [ + { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "a", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 326, + 327 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 324, + 327 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "b", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 26 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 330, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 324, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 314, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "character", + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "characters", + "range": [ + 167, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "operator": "%", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "characters", + "range": [ + 182, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 41 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 182, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 178, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 167, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 48 + } + } + }, + "range": [ + 156, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 48 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "range": [ + 209, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "optional": false, + "range": [ + 209, + 222 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 209, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 206, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "20", + "value": 20, + "range": [ + 238, + 240 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 237, + 240 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 248, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "range": [ + 243, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 243, + 256 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 259, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 243, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 237, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 234, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "r", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "0.1", + "value": 0.1, + "range": [ + 271, + 274 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 277, + 288 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 277, + 290 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 277, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 271, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 268, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 30 + } + } + } + ], + "range": [ + 150, + 299 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "range": [ + 143, + 300 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 13, + "column": 5 + } + } + } + ], + "range": [ + 138, + 304 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "_", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 128, + 304 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 14, + "column": 3 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "NewExpression", + "arguments": [ + { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 109, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 29 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Array", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 99, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "fill", + "range": [ + 114, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "range": [ + 99, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 99, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 37 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "map", + "range": [ + 124, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "range": [ + 99, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "optional": false, + "range": [ + 99, + 305 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 14, + "column": 4 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sort", + "range": [ + 309, + 313 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "range": [ + 99, + 313 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 99, + 334 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "range": [ + 88, + 334 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 15, + "column": 28 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 753, + 761 + ], + "loc": { + "start": { + "line": 47, + "column": 7 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Array", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 338, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 753, + 761 + ], + "loc": { + "start": { + "line": 47, + "column": 7 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "_", + "identifiers": [ + { + "type": "Identifier", + "name": "_", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "_", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "character", + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "characters", + "range": [ + 167, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "operator": "%", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "characters", + "range": [ + 182, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 41 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 182, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 178, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 167, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 48 + } + } + }, + "range": [ + 156, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 48 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "range": [ + 209, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "optional": false, + "range": [ + 209, + 222 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 209, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 206, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "20", + "value": 20, + "range": [ + 238, + 240 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 237, + 240 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 248, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "range": [ + 243, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 243, + 256 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 259, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 243, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 237, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 234, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "r", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "0.1", + "value": 0.1, + "range": [ + 271, + 274 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 277, + 288 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 277, + 290 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 277, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 271, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 268, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 30 + } + } + } + ], + "range": [ + 150, + 299 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "range": [ + 143, + 300 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 13, + "column": 5 + } + } + } + ], + "range": [ + 138, + 304 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "_", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 128, + 304 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 14, + "column": 3 + } + } + } + } + ], + "references": [] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "character", + "range": [ + 156, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "characters", + "range": [ + 167, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "operator": "%", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "characters", + "range": [ + 182, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 41 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 182, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 178, + 199 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 47 + } + } + }, + "range": [ + 167, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 48 + } + } + }, + "range": [ + 156, + 200 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 48 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "range": [ + 209, + 220 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "optional": false, + "range": [ + 209, + 222 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 209, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "range": [ + 206, + 228 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "20", + "value": 20, + "range": [ + 238, + 240 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 237, + 240 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 248, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "range": [ + 243, + 254 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 243, + 256 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 259, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 243, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 237, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 7 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 234, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "r", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "0.1", + "value": 0.1, + "range": [ + 271, + 274 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "range": [ + 277, + 288 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 277, + 290 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 277, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 271, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "range": [ + 268, + 294 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 30 + } + } + } + ], + "range": [ + 150, + 299 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + "range": [ + 143, + 300 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 13, + "column": 5 + } + } + } + ], + "range": [ + 138, + 304 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "_", + "range": [ + 129, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + ], + "range": [ + 128, + 304 + ], + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 14, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 167, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 182, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 167, + 177 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "characters", + "range": [ + 182, + 192 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "characters", + "range": [ + 50, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "a", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 326, + 327 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 324, + 327 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "b", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 26 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 330, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 324, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 314, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "a", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 326, + 327 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 324, + 327 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "b", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 332, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 26 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 330, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "range": [ + 324, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "range": [ + 314, + 333 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 324, + 325 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 315, + 316 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "frame", + "identifiers": [ + { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "init": null, + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 391, + 396 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 612, + 617 + ], + "loc": { + "start": { + "line": 32, + "column": 36 + }, + "end": { + "line": 32, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ] + }, + { + "name": "loop", + "identifiers": [ + { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "frame", + "range": [ + 391, + 396 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "loop", + "range": [ + 421, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 399, + 420 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "optional": false, + "range": [ + 399, + 426 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 38 + } + } + }, + "range": [ + 391, + 426 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 38 + } + } + }, + "range": [ + 391, + 427 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "confetti", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 471, + 476 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + "range": [ + 471, + 478 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + "operator": "+=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "0.7", + "value": 0.7, + "range": [ + 482, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + "operator": "*", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 488, + 493 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 27 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 488, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 482, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 471, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 471, + 496 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 520, + 525 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 526, + 527 + ], + "loc": { + "start": { + "line": 25, + "column": 29 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + "range": [ + 520, + 527 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "20", + "value": 20, + "range": [ + 531, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 34 + }, + "end": { + "line": 25, + "column": 36 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 530, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 36 + } + } + }, + "range": [ + 520, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 36 + } + } + }, + "range": [ + 520, + 534 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 37 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + "range": [ + 505, + 512 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 515, + 518 + ], + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "range": [ + 505, + 518 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "range": [ + 501, + 534 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 37 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "emoji", + "range": [ + 546, + 551 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + "range": [ + 539, + 552 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 17 + } + } + } + ], + "range": [ + 465, + 557 + ], + "loc": { + "start": { + "line": 23, + "column": 36 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + ], + "range": [ + 456, + 557 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 27, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "confetti", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "map", + "range": [ + 452, + 455 + ], + "loc": { + "start": { + "line": 23, + "column": 23 + }, + "end": { + "line": 23, + "column": 26 + } + } + }, + "range": [ + 443, + 455 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 443, + 558 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + "range": [ + 432, + 558 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 27, + "column": 5 + } + } + }, + "range": [ + 432, + 559 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 27, + "column": 6 + } + } + } + ], + "range": [ + 386, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "params": [], + "range": [ + 370, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 421, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 567, + 571 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 567, + 571 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 391, + 396 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 399, + 420 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 421, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "emoji", + "identifiers": [ + { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 471, + 476 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + "range": [ + 471, + 478 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + "operator": "+=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "0.7", + "value": 0.7, + "range": [ + 482, + 485 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + "operator": "*", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 488, + 493 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 27 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 488, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 482, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 471, + 495 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 471, + 496 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 520, + 525 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 526, + 527 + ], + "loc": { + "start": { + "line": 25, + "column": 29 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + "range": [ + 520, + 527 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "20", + "value": 20, + "range": [ + 531, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 34 + }, + "end": { + "line": 25, + "column": 36 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 530, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 33 + }, + "end": { + "line": 25, + "column": 36 + } + } + }, + "range": [ + 520, + 533 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 36 + } + } + }, + "range": [ + 520, + 534 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 37 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "emoji", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + "range": [ + 505, + 512 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 15 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "120", + "value": 120, + "range": [ + 515, + 518 + ], + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "range": [ + 505, + 518 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "range": [ + 501, + 534 + ], + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 37 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "emoji", + "range": [ + 546, + 551 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + "range": [ + 539, + 552 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 17 + } + } + } + ], + "range": [ + 465, + 557 + ], + "loc": { + "start": { + "line": 23, + "column": 36 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + ], + "range": [ + 456, + 557 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 27, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 471, + 476 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 488, + 493 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 520, + 525 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 546, + 551 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 471, + 476 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 488, + 493 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 520, + 525 + ], + "loc": { + "start": { + "line": 25, + "column": 23 + }, + "end": { + "line": 25, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "emoji", + "range": [ + 546, + 551 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "emoji", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 23, + "column": 27 + }, + "end": { + "line": 23, + "column": 32 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 391, + 396 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 399, + 420 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "loop", + "range": [ + 421, + 425 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "loop", + "range": [ + 379, + 383 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 591, + 611 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 612, + 617 + ], + "loc": { + "start": { + "line": 32, + "column": 36 + }, + "end": { + "line": 32, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 591, + 611 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "frame", + "range": [ + 612, + 617 + ], + "loc": { + "start": { + "line": 32, + "column": 36 + }, + "end": { + "line": 32, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "frame", + "range": [ + 360, + 365 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 399, + 420 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "confetti", + "range": [ + 443, + 451 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "confetti", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 591, + 611 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "c", + "identifiers": [ + { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "confetti", + "range": [ + 753, + 761 + ], + "loc": { + "start": { + "line": 47, + "column": 7 + }, + "end": { + "line": 47, + "column": 15 + } + } + }, + "context": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 770, + 774 + ], + "loc": { + "start": { + "line": 48, + "column": 2 + }, + "end": { + "line": 48, + "column": 6 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 775, + 780 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "left: ", + "range": [ + 782, + 788 + ], + "loc": { + "start": { + "line": 48, + "column": 14 + }, + "end": { + "line": 48, + "column": 20 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "c", + "range": [ + 789, + 790 + ], + "loc": { + "start": { + "line": 48, + "column": 21 + }, + "end": { + "line": 48, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 791, + 792 + ], + "loc": { + "start": { + "line": 48, + "column": 23 + }, + "end": { + "line": 48, + "column": 24 + } + } + }, + "range": [ + 789, + 792 + ], + "loc": { + "start": { + "line": 48, + "column": 21 + }, + "end": { + "line": 48, + "column": 24 + } + } + }, + "range": [ + 788, + 793 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 25 + } + } + }, + { + "type": "SvelteLiteral", + "value": "%; top: ", + "range": [ + 793, + 801 + ], + "loc": { + "start": { + "line": 48, + "column": 25 + }, + "end": { + "line": 48, + "column": 33 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "c", + "range": [ + 802, + 803 + ], + "loc": { + "start": { + "line": 48, + "column": 34 + }, + "end": { + "line": 48, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 804, + 805 + ], + "loc": { + "start": { + "line": 48, + "column": 36 + }, + "end": { + "line": 48, + "column": 37 + } + } + }, + "range": [ + 802, + 805 + ], + "loc": { + "start": { + "line": 48, + "column": 34 + }, + "end": { + "line": 48, + "column": 37 + } + } + }, + "range": [ + 801, + 806 + ], + "loc": { + "start": { + "line": 48, + "column": 33 + }, + "end": { + "line": 48, + "column": 38 + } + } + }, + { + "type": "SvelteLiteral", + "value": "%; transform: scale(", + "range": [ + 806, + 826 + ], + "loc": { + "start": { + "line": 48, + "column": 38 + }, + "end": { + "line": 48, + "column": 58 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "c", + "range": [ + 827, + 828 + ], + "loc": { + "start": { + "line": 48, + "column": 59 + }, + "end": { + "line": 48, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "r", + "range": [ + 829, + 830 + ], + "loc": { + "start": { + "line": 48, + "column": 61 + }, + "end": { + "line": 48, + "column": 62 + } + } + }, + "range": [ + 827, + 830 + ], + "loc": { + "start": { + "line": 48, + "column": 59 + }, + "end": { + "line": 48, + "column": 62 + } + } + }, + "range": [ + 826, + 831 + ], + "loc": { + "start": { + "line": 48, + "column": 58 + }, + "end": { + "line": 48, + "column": 63 + } + } + }, + { + "type": "SvelteLiteral", + "value": ")", + "range": [ + 831, + 832 + ], + "loc": { + "start": { + "line": 48, + "column": 63 + }, + "end": { + "line": 48, + "column": 64 + } + } + } + ], + "range": [ + 775, + 833 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 65 + } + } + } + ], + "selfClosing": false, + "range": [ + 769, + 834 + ], + "loc": { + "start": { + "line": 48, + "column": 1 + }, + "end": { + "line": 48, + "column": 66 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "c", + "range": [ + 835, + 836 + ], + "loc": { + "start": { + "line": 48, + "column": 67 + }, + "end": { + "line": 48, + "column": 68 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "character", + "range": [ + 837, + 846 + ], + "loc": { + "start": { + "line": 48, + "column": 69 + }, + "end": { + "line": 48, + "column": 78 + } + } + }, + "range": [ + 835, + 846 + ], + "loc": { + "start": { + "line": 48, + "column": 67 + }, + "end": { + "line": 48, + "column": 78 + } + } + }, + "range": [ + 834, + 847 + ], + "loc": { + "start": { + "line": 48, + "column": 66 + }, + "end": { + "line": 48, + "column": 79 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 847, + 854 + ], + "loc": { + "start": { + "line": 48, + "column": 79 + }, + "end": { + "line": 48, + "column": 86 + } + } + }, + "range": [ + 769, + 854 + ], + "loc": { + "start": { + "line": 48, + "column": 1 + }, + "end": { + "line": 48, + "column": 86 + } + } + } + ], + "else": null, + "range": [ + 746, + 862 + ], + "loc": { + "start": { + "line": 47, + "column": 0 + }, + "end": { + "line": 49, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 789, + 790 + ], + "loc": { + "start": { + "line": 48, + "column": 21 + }, + "end": { + "line": 48, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 802, + 803 + ], + "loc": { + "start": { + "line": 48, + "column": 34 + }, + "end": { + "line": 48, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 827, + 828 + ], + "loc": { + "start": { + "line": 48, + "column": 59 + }, + "end": { + "line": 48, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 835, + 836 + ], + "loc": { + "start": { + "line": 48, + "column": 67 + }, + "end": { + "line": 48, + "column": 68 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 789, + 790 + ], + "loc": { + "start": { + "line": 48, + "column": 21 + }, + "end": { + "line": 48, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 802, + 803 + ], + "loc": { + "start": { + "line": 48, + "column": 34 + }, + "end": { + "line": 48, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 827, + 828 + ], + "loc": { + "start": { + "line": 48, + "column": 59 + }, + "end": { + "line": 48, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 835, + 836 + ], + "loc": { + "start": { + "line": 48, + "column": 67 + }, + "end": { + "line": 48, + "column": 68 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 765, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 19 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Array", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 399, + 420 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 591, + 611 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Array", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 209, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 243, + 247 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 277, + 281 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "requestAnimationFrame", + "range": [ + 399, + 420 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cancelAnimationFrame", + "range": [ + 591, + 611 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json new file mode 100644 index 00000000..7d818404 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json @@ -0,0 +1,378 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "html", + "identifiers": [ + { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'

Write some text!

'", + "value": "

Write some text!

", + "range": [ + 21, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + "range": [ + 14, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 37 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 103, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 44 + }, + "end": { + "line": 5, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 123, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 103, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 44 + }, + "end": { + "line": 5, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "html", + "range": [ + 123, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "html", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json new file mode 100644 index 00000000..fa150e89 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json @@ -0,0 +1,762 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Map", + "identifiers": [ + { + "type": "Identifier", + "name": "Map", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Map", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Map", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Map", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Map", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "MapMarker", + "identifiers": [ + { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 136, + 145 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 208, + 217 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 291, + 300 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 363, + 372 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 448, + 457 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 517, + 526 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 136, + 145 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 208, + 217 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 291, + 300 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 363, + 372 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 448, + 457 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 517, + 526 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MapMarker", + "range": [ + 50, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Map", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Map", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json new file mode 100644 index 00000000..7f4ea7b5 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json @@ -0,0 +1,3669 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onMount", + "identifiers": [ + { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 227, + 234 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "setContext", + "identifiers": [ + { + "type": "Identifier", + "name": "setContext", + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "setContext", + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "setContext", + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "local": { + "type": "Identifier", + "name": "setContext", + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "setContext", + "range": [ + 102, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "setContext", + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ] + }, + { + "name": "mapbox", + "identifiers": [ + { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "local": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 419, + 425 + ], + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ] + }, + { + "name": "key", + "identifiers": [ + { + "type": "Identifier", + "name": "key", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "key", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "key", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "local": { + "type": "Identifier", + "name": "key", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + }, + { + "name": "lat", + "identifiers": [ + { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "init": null, + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + } + ] + }, + { + "name": "lon", + "identifiers": [ + { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "init": null, + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 508, + 511 + ], + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + } + ] + }, + { + "name": "zoom", + "identifiers": [ + { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "init": null, + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "zoom", + "range": [ + 523, + 527 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + } + ] + }, + { + "name": "container", + "identifiers": [ + { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "init": null, + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "container", + "range": [ + 436, + 445 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "container", + "range": [ + 745, + 754 + ], + "loc": { + "start": { + "line": 46, + "column": 16 + }, + "end": { + "line": 46, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + } + ] + }, + { + "name": "map", + "identifiers": [ + { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + "init": null, + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 409, + 412 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 597, + 600 + ], + "loc": { + "start": { + "line": 33, + "column": 3 + }, + "end": { + "line": 33, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 763, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "setContext", + "range": [ + 102, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "setContext", + "range": [ + 28, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 227, + 234 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "container", + "range": [ + 745, + 754 + ], + "loc": { + "start": { + "line": 46, + "column": 16 + }, + "end": { + "line": 46, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 763, + 766 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "link", + "identifiers": [ + { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'link'", + "value": "link", + "range": [ + 281, + 287 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 17, + "column": 44 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "document", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "createElement", + "range": [ + 267, + 280 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 258, + 280 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "optional": false, + "range": [ + 258, + 288 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 45 + } + } + }, + "range": [ + 251, + 288 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 45 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 292, + 296 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 319, + 323 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 384, + 388 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 30, + "column": 28 + }, + "end": { + "line": 30, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 614, + 618 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 642, + 646 + ], + "loc": { + "start": { + "line": 34, + "column": 31 + }, + "end": { + "line": 34, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 292, + 296 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 319, + 323 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 384, + 388 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 543, + 551 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 30, + "column": 28 + }, + "end": { + "line": 30, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 409, + 412 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 419, + 425 + ], + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "container", + "range": [ + 436, + 445 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 508, + 511 + ], + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "zoom", + "range": [ + 523, + 527 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 409, + 412 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 419, + 425 + ], + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "container", + "range": [ + 436, + 445 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 508, + 511 + ], + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "zoom", + "range": [ + 523, + 527 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 597, + 600 + ], + "loc": { + "start": { + "line": 33, + "column": 3 + }, + "end": { + "line": 33, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 614, + 618 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 642, + 646 + ], + "loc": { + "start": { + "line": 34, + "column": 31 + }, + "end": { + "line": 34, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 597, + 600 + ], + "loc": { + "start": { + "line": 33, + "column": 3 + }, + "end": { + "line": 33, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 614, + 618 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "link", + "range": [ + 642, + 646 + ], + "loc": { + "start": { + "line": 34, + "column": 31 + }, + "end": { + "line": 34, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "link", + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 409, + 412 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 419, + 425 + ], + "loc": { + "start": { + "line": 22, + "column": 13 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 66, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "container", + "range": [ + 436, + 445 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "container", + "range": [ + 204, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 508, + 511 + ], + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 513, + 516 + ], + "loc": { + "start": { + "line": 25, + "column": 18 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 158, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "zoom", + "range": [ + 523, + 527 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "zoom", + "range": [ + 192, + 196 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 543, + 551 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 597, + 600 + ], + "loc": { + "start": { + "line": 33, + "column": 3 + }, + "end": { + "line": 33, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 220, + 223 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 8 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 543, + 551 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 258, + 266 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 543, + 551 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json new file mode 100644 index 00000000..94abca35 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json @@ -0,0 +1,2875 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "getContext", + "identifiers": [ + { + "type": "Identifier", + "name": "getContext", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "getContext", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "getContext", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "local": { + "type": "Identifier", + "name": "getContext", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "getContext", + "range": [ + 112, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getContext", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "name": "mapbox", + "identifiers": [ + { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "local": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 226, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 295, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ] + }, + { + "name": "key", + "identifiers": [ + { + "type": "Identifier", + "name": "key", + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "key", + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "key", + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "local": { + "type": "Identifier", + "name": "key", + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 123, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + }, + { + "name": "getMap", + "identifiers": [ + { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "range": [ + 99, + 109 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "key", + "range": [ + 123, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getContext", + "range": [ + 112, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 112, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + "range": [ + 99, + 127 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getMap", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "name": "map", + "identifiers": [ + { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "getMap", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 142, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 136, + 150 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 364, + 367 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + } + ] + }, + { + "name": "lat", + "identifiers": [ + { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "init": null, + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 330, + 333 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + } + ] + }, + { + "name": "lon", + "identifiers": [ + { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "init": null, + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 325, + 328 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + } + ] + }, + { + "name": "label", + "identifiers": [ + { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "init": null, + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "label", + "range": [ + 266, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + } + ] + }, + { + "name": "popup", + "identifiers": [ + { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "label", + "range": [ + 266, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 16 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "NewExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "offset", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 40 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "25", + "value": 25, + "range": [ + 249, + 251 + ], + "loc": { + "start": { + "line": 12, + "column": 42 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "range": [ + 241, + 251 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 44 + } + } + } + ], + "range": [ + 239, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 46 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 226, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "Popup", + "range": [ + 233, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 26 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 226, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 222, + 254 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "setText", + "range": [ + 258, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "range": [ + 222, + 265 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 222, + 272 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 214, + 272 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 13, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "popup", + "range": [ + 348, + 353 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + } + ] + }, + { + "name": "marker", + "identifiers": [ + { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "map", + "range": [ + 364, + 367 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 12 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "popup", + "range": [ + 348, + 353 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrayExpression", + "elements": [ + { + "type": "Identifier", + "name": "lon", + "range": [ + 325, + 328 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + { + "type": "Identifier", + "name": "lat", + "range": [ + 330, + 333 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 22 + } + } + } + ], + "range": [ + 324, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "NewExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 295, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "Marker", + "range": [ + 302, + 308 + ], + "loc": { + "start": { + "line": 15, + "column": 27 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + "range": [ + 295, + 308 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + "range": [ + 291, + 310 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "setLngLat", + "range": [ + 314, + 323 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "range": [ + 291, + 323 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 291, + 335 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "setPopup", + "range": [ + 339, + 347 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "range": [ + 291, + 347 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "optional": false, + "range": [ + 291, + 354 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "addTo", + "range": [ + 358, + 363 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "range": [ + 291, + 363 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 291, + 368 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "range": [ + 282, + 368 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getContext", + "range": [ + 112, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getContext", + "range": [ + 19, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 123, + 126 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 65, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getMap", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "getMap", + "range": [ + 101, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 226, + 232 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "label", + "range": [ + 266, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "label", + "range": [ + 199, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "marker", + "range": [ + 282, + 288 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 295, + 301 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mapbox", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lon", + "range": [ + 325, + 328 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lon", + "range": [ + 182, + 185 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "lat", + "range": [ + 330, + 333 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "lat", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "popup", + "range": [ + 348, + 353 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "popup", + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "map", + "range": [ + 364, + 367 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "map", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json new file mode 100644 index 00000000..d9dfaad7 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json @@ -0,0 +1,6697 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "fade", + "identifiers": [ + { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 81, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "opacity", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 81, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "operator": "+", + "prefix": true, + "range": [ + 80, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 76, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 43 + } + } + } + ], + "range": [ + 70, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 151, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "opacity: ", + "raw": "opacity: " + }, + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 178, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 161, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 156, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 151, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 123, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [ + 116, + 185 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 66, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "range": [ + 30, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + ], + "range": [ + 10, + 188 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 656, + 660 + ], + "loc": { + "start": { + "line": 46, + "column": 56 + }, + "end": { + "line": 46, + "column": 60 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 205, + 209 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "range": [ + 195, + 209 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 557, + 564 + ], + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 591, + 598 + ], + "loc": { + "start": { + "line": 45, + "column": 5 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + } + ] + }, + { + "name": "spin", + "identifiers": [ + { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 276, + 279 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "range": [ + 281, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "range": [ + 276, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 258, + 292 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 251, + 293 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 247, + 296 + ], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + } + ], + "range": [ + 233, + 245 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 213, + 296 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "spin", + "range": [ + 626, + 630 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 557, + 564 + ], + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 591, + 598 + ], + "loc": { + "start": { + "line": 45, + "column": 5 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 195, + 202 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 81, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "opacity", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 81, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "operator": "+", + "prefix": true, + "range": [ + 80, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 76, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 43 + } + } + } + ], + "range": [ + 70, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 151, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "opacity: ", + "raw": "opacity: " + }, + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 178, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 161, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 156, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 151, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 123, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [ + 116, + 185 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 66, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "range": [ + 30, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + ], + "range": [ + 10, + 188 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "delay", + "identifiers": [ + { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 81, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "opacity", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 81, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "operator": "+", + "prefix": true, + "range": [ + 80, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 76, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 43 + } + } + } + ], + "range": [ + 70, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 151, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "opacity: ", + "raw": "opacity: " + }, + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 178, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 161, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 156, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 151, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 123, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [ + 116, + 185 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 66, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "range": [ + 30, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + ], + "range": [ + 10, + 188 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + } + ] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 81, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "opacity", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 81, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "operator": "+", + "prefix": true, + "range": [ + 80, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 76, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 43 + } + } + } + ], + "range": [ + 70, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 151, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "opacity: ", + "raw": "opacity: " + }, + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 178, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 161, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 156, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "range": [ + 151, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 123, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [ + 116, + 185 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 66, + 188 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "right": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 58, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 47, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "range": [ + 30, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + ], + "range": [ + 10, + 188 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "name": "o", + "identifiers": [ + { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 81, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "opacity", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 81, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "operator": "+", + "prefix": true, + "range": [ + 80, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + "range": [ + 76, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 43 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 24, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "delay", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "delay", + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 138, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "opacity: ", + "raw": "opacity: " + }, + "range": [ + 161, + 173 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 178, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 30 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "range": [ + 161, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 156, + 180 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "o", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "o", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 276, + 279 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "range": [ + 281, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "range": [ + 276, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 258, + 292 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 251, + 293 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 247, + 296 + ], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + } + ], + "range": [ + 233, + 245 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 213, + 296 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 276, + 279 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "range": [ + 281, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "range": [ + 276, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 258, + 292 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 251, + 293 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 247, + 296 + ], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 227, + 231 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + } + ], + "range": [ + 233, + 245 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 213, + 296 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 263, + 271 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 235, + 243 + ], + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 31 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + ], + "range": [ + 286, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 13 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "range": [ + 281, + 288 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 15 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "spin", + "range": [ + 626, + 630 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 656, + 660 + ], + "loc": { + "start": { + "line": 46, + "column": 56 + }, + "end": { + "line": 46, + "column": 60 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "spin", + "range": [ + 626, + 630 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spin", + "range": [ + 222, + 226 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 656, + 660 + ], + "loc": { + "start": { + "line": 46, + "column": 56 + }, + "end": { + "line": 46, + "column": 60 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 81, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json new file mode 100644 index 00000000..22ba8855 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json @@ -0,0 +1,6590 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "fade", + "identifiers": [ + { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 803, + 807 + ], + "loc": { + "start": { + "line": 46, + "column": 56 + }, + "end": { + "line": 46, + "column": 60 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "elasticOut", + "identifiers": [ + { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "local": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 113, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "range": [ + 103, + 117 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 704, + 711 + ], + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 738, + 745 + ], + "loc": { + "start": { + "line": 45, + "column": 5 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + } + ] + }, + { + "name": "spin", + "identifiers": [ + { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 184, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 214, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 206, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 31 + } + } + } + ], + "range": [ + 200, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "eased", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "eased", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1080", + "value": 1080, + "range": [ + 292, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 49 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "range": [ + 284, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 335, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "range": [ + 331, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 329, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 328, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 359, + 362 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 364, + 368 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 371, + 375 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 36 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 371, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 355, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "range": [ + 350, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 350, + 380 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 401, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 411, + 414 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 411, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 405, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 397, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "range": [ + 392, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 392, + 419 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 35 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: scale(", + "raw": "\n\t\t\t\t\ttransform: scale(" + }, + "range": [ + 241, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 14, + "column": 24 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ") rotate(", + "raw": ") rotate(" + }, + "range": [ + 272, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", + "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" + }, + "range": [ + 296, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 53 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ",\n\t\t\t\t\t\t", + "raw": ",\n\t\t\t\t\t\t" + }, + "range": [ + 339, + 350 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "%,\n\t\t\t\t\t\t", + "raw": "%,\n\t\t\t\t\t\t" + }, + "range": [ + 380, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "%\n\t\t\t\t\t);", + "raw": "%\n\t\t\t\t\t);" + }, + "range": [ + 419, + 430 + ], + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 241, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "range": [ + 234, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 194, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 189, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 184, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 166, + 439 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 159, + 440 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 155, + 443 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + ], + "range": [ + 141, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 33 + } + } + } + ], + "range": [ + 121, + 443 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "spin", + "range": [ + 773, + 777 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 704, + 711 + ], + "loc": { + "start": { + "line": 41, + "column": 38 + }, + "end": { + "line": 41, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 738, + 745 + ], + "loc": { + "start": { + "line": 45, + "column": 5 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 184, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 214, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 206, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 31 + } + } + } + ], + "range": [ + 200, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "eased", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "eased", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1080", + "value": 1080, + "range": [ + 292, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 49 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "range": [ + 284, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 335, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "range": [ + 331, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 329, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 328, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 359, + 362 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 364, + 368 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 371, + 375 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 36 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 371, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 355, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "range": [ + 350, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 350, + 380 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 401, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 411, + 414 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 411, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 405, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 397, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "range": [ + 392, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 392, + 419 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 35 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: scale(", + "raw": "\n\t\t\t\t\ttransform: scale(" + }, + "range": [ + 241, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 14, + "column": 24 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ") rotate(", + "raw": ") rotate(" + }, + "range": [ + 272, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", + "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" + }, + "range": [ + 296, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 53 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ",\n\t\t\t\t\t\t", + "raw": ",\n\t\t\t\t\t\t" + }, + "range": [ + 339, + 350 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "%,\n\t\t\t\t\t\t", + "raw": "%,\n\t\t\t\t\t\t" + }, + "range": [ + 380, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "%\n\t\t\t\t\t);", + "raw": "%\n\t\t\t\t\t);" + }, + "range": [ + 419, + 430 + ], + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 241, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "range": [ + 234, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 194, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 189, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 184, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 166, + 439 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 159, + 440 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 155, + 443 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + ], + "range": [ + 141, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 33 + } + } + } + ], + "range": [ + 121, + 443 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 184, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 214, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 206, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 31 + } + } + } + ], + "range": [ + 200, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "eased", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "eased", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1080", + "value": 1080, + "range": [ + 292, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 49 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "range": [ + 284, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 335, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "range": [ + 331, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 329, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 328, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 359, + 362 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 364, + 368 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 371, + 375 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 36 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 371, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 355, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "range": [ + 350, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 350, + 380 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 401, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 411, + 414 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 411, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 405, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 397, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "range": [ + 392, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 392, + 419 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 35 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: scale(", + "raw": "\n\t\t\t\t\ttransform: scale(" + }, + "range": [ + 241, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 14, + "column": 24 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ") rotate(", + "raw": ") rotate(" + }, + "range": [ + 272, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", + "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" + }, + "range": [ + 296, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 53 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ",\n\t\t\t\t\t\t", + "raw": ",\n\t\t\t\t\t\t" + }, + "range": [ + 339, + 350 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "%,\n\t\t\t\t\t\t", + "raw": "%,\n\t\t\t\t\t\t" + }, + "range": [ + 380, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "%\n\t\t\t\t\t);", + "raw": "%\n\t\t\t\t\t);" + }, + "range": [ + 419, + 430 + ], + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 241, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "range": [ + 234, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 194, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 189, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 184, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + ], + "range": [ + 166, + 439 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 159, + 440 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "range": [ + 155, + 443 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 135, + 139 + ], + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + ], + "range": [ + 141, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 33 + } + } + } + ], + "range": [ + 121, + 443 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 171, + 179 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 143, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 31 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 214, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 206, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 31 + } + } + } + ], + "range": [ + 200, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "eased", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "eased", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "1080", + "value": 1080, + "range": [ + 292, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 49 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "range": [ + 284, + 296 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "360", + "value": 360, + "range": [ + 335, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "range": [ + 331, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 329, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 328, + 339 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 19 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "100", + "value": 100, + "range": [ + 359, + 362 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 364, + 368 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 26 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 371, + 375 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 36 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 371, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 29 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 22 + }, + "end": { + "line": 17, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 355, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "range": [ + 350, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 350, + 380 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 401, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 405, + 408 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "operator": "-", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 411, + 414 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 411, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 27 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "range": [ + 405, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 21 + }, + "end": { + "line": 18, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "min", + "range": [ + 397, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "range": [ + 392, + 400 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 392, + 419 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 35 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: scale(", + "raw": "\n\t\t\t\t\ttransform: scale(" + }, + "range": [ + 241, + 267 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 14, + "column": 24 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ") rotate(", + "raw": ") rotate(" + }, + "range": [ + 272, + 284 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", + "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" + }, + "range": [ + 296, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 53 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ",\n\t\t\t\t\t\t", + "raw": ",\n\t\t\t\t\t\t" + }, + "range": [ + 339, + 350 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "%,\n\t\t\t\t\t\t", + "raw": "%,\n\t\t\t\t\t\t" + }, + "range": [ + 380, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "%\n\t\t\t\t\t);", + "raw": "%\n\t\t\t\t\t);" + }, + "range": [ + 419, + 430 + ], + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 241, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + "range": [ + 234, + 430 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 19, + "column": 8 + } + } + } + ], + "range": [ + 194, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + ], + "range": [ + 189, + 435 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 20, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 36 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + } + ] + }, + { + "name": "eased", + "identifiers": [ + { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 214, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 206, + 227 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eased", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eased", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eased", + "range": [ + 267, + 272 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eased", + "range": [ + 284, + 289 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eased", + "range": [ + 206, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 17, + "column": 36 + }, + "end": { + "line": 17, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 214, + 224 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elasticOut", + "range": [ + 62, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "spin", + "range": [ + 773, + 777 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 803, + 807 + ], + "loc": { + "start": { + "line": 46, + "column": 56 + }, + "end": { + "line": 46, + "column": 60 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "spin", + "range": [ + 773, + 777 + ], + "loc": { + "start": { + "line": 46, + "column": 26 + }, + "end": { + "line": 46, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spin", + "range": [ + 130, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 803, + 807 + ], + "loc": { + "start": { + "line": 46, + "column": 56 + }, + "end": { + "line": 46, + "column": 60 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 392, + 396 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json new file mode 100644 index 00000000..f8f2fd1c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json @@ -0,0 +1,8622 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 24, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 14, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 559, + 566 + ], + "loc": { + "start": { + "line": 28, + "column": 38 + }, + "end": { + "line": 28, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 593, + 600 + ], + "loc": { + "start": { + "line": 32, + "column": 5 + }, + "end": { + "line": 32, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "typewriter", + "identifiers": [ + { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 103, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 98, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 98, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 98, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 138, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 133, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 133, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 152, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 133, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 170, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 165, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 133, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 98, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 85, + 183 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 79, + 184 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ThrowStatement", + "argument": { + "type": "NewExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "This transition only works on elements with a single text node child", + "raw": "This transition only works on elements with a single text node child" + }, + "range": [ + 221, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 89 + } + } + } + ], + "range": [ + 221, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 89 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "range": [ + 211, + 292 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 90 + } + } + }, + "range": [ + 205, + 293 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 91 + } + } + } + ], + "range": [ + 200, + 297 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 192, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 188, + 297 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 314, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 319, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 314, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 307, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 31 + } + } + } + ], + "range": [ + 301, + 331 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 356, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "range": [ + 351, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 351, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 340, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 38 + } + } + } + ], + "range": [ + 334, + 371 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 400, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 435, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 430, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 430, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 428, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 427, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "range": [ + 423, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 33 + } + } + } + ], + "range": [ + 417, + 447 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 457, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "range": [ + 452, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 482, + 483 + ], + "loc": { + "start": { + "line": 21, + "column": 34 + }, + "end": { + "line": 21, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 476, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "range": [ + 471, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 471, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 488 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 40 + } + } + } + ], + "range": [ + 411, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "range": [ + 406, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "range": [ + 400, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 22, + "column": 4 + } + } + } + ], + "range": [ + 382, + 497 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + "range": [ + 375, + 498 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + } + ], + "range": [ + 75, + 501 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 59, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 33, + 501 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 609, + 619 + ], + "loc": { + "start": { + "line": 33, + "column": 7 + }, + "end": { + "line": 33, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 559, + 566 + ], + "loc": { + "start": { + "line": 28, + "column": 38 + }, + "end": { + "line": 28, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 593, + 600 + ], + "loc": { + "start": { + "line": 32, + "column": 5 + }, + "end": { + "line": 32, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 103, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 98, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 98, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 98, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 138, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 133, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 133, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 152, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 133, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 170, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 165, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 133, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 98, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 85, + 183 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 79, + 184 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ThrowStatement", + "argument": { + "type": "NewExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "This transition only works on elements with a single text node child", + "raw": "This transition only works on elements with a single text node child" + }, + "range": [ + 221, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 89 + } + } + } + ], + "range": [ + 221, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 89 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "range": [ + 211, + 292 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 90 + } + } + }, + "range": [ + 205, + 293 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 91 + } + } + } + ], + "range": [ + 200, + 297 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 192, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 188, + 297 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 314, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 319, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 314, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 307, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 31 + } + } + } + ], + "range": [ + 301, + 331 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 356, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "range": [ + 351, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 351, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 340, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 38 + } + } + } + ], + "range": [ + 334, + 371 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 400, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 435, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 430, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 430, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 428, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 427, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "range": [ + 423, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 33 + } + } + } + ], + "range": [ + 417, + 447 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 457, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "range": [ + 452, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 482, + 483 + ], + "loc": { + "start": { + "line": 21, + "column": 34 + }, + "end": { + "line": 21, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 476, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "range": [ + 471, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 471, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 488 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 40 + } + } + } + ], + "range": [ + 411, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "range": [ + 406, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "range": [ + 400, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 22, + "column": 4 + } + } + } + ], + "range": [ + 382, + 497 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + "range": [ + 375, + 498 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + } + ], + "range": [ + 75, + 501 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 59, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 33, + 501 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 314, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + }, + { + "name": "speed", + "identifiers": [ + { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 103, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 98, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 98, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 98, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 138, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 133, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 133, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 152, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 133, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 170, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 165, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 133, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 98, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 85, + 183 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 79, + 184 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 8, + "column": 4 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ThrowStatement", + "argument": { + "type": "NewExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "This transition only works on elements with a single text node child", + "raw": "This transition only works on elements with a single text node child" + }, + "range": [ + 221, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 89 + } + } + } + ], + "range": [ + 221, + 291 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 89 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "range": [ + 211, + 292 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 90 + } + } + }, + "range": [ + 205, + 293 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 91 + } + } + } + ], + "range": [ + 200, + 297 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "valid", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 192, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "range": [ + 188, + 297 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 314, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 319, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 314, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 307, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 31 + } + } + } + ], + "range": [ + 301, + 331 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 356, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "range": [ + 351, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 351, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 340, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 38 + } + } + } + ], + "range": [ + 334, + 371 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 39 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "tick", + "range": [ + 400, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 435, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 430, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 430, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 428, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 427, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "range": [ + 423, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 33 + } + } + } + ], + "range": [ + 417, + 447 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 457, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "range": [ + 452, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 482, + 483 + ], + "loc": { + "start": { + "line": 21, + "column": 34 + }, + "end": { + "line": 21, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 476, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "range": [ + 471, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 471, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 488 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 40 + } + } + } + ], + "range": [ + 411, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "range": [ + 406, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "range": [ + 400, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 22, + "column": 4 + } + } + } + ], + "range": [ + 382, + 497 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + "range": [ + 375, + 498 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + } + ], + "range": [ + 75, + 501 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 69, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 37 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 39 + } + } + } + ], + "range": [ + 59, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + ], + "range": [ + 33, + 501 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + } + ] + }, + { + "name": "valid", + "identifiers": [ + { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 103, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 98, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 114, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 98, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 98, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "childNodes", + "range": [ + 138, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 133, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "range": [ + 133, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "nodeType", + "range": [ + 152, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "range": [ + 133, + 160 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "operator": "===", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "TEXT_NODE", + "range": [ + 170, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 40 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 165, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 133, + 179 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 98, + 179 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + "range": [ + 85, + 183 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 314, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 319, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 314, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 31 + } + } + }, + "range": [ + 307, + 330 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + } + ] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "init": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 356, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "range": [ + 351, + 362 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "speed", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 351, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "range": [ + 340, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 98, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "valid", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "valid", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 314, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 351, + 355 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 365, + 370 + ], + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 387, + 395 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 340, + 348 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 435, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 430, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 430, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 428, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 427, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "range": [ + 423, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 33 + } + } + } + ], + "range": [ + 417, + 447 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "textContent", + "range": [ + 457, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "range": [ + 452, + 468 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 482, + 483 + ], + "loc": { + "start": { + "line": 21, + "column": 34 + }, + "end": { + "line": 21, + "column": 35 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 476, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "range": [ + 471, + 481 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 471, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 487 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 39 + } + } + }, + "range": [ + 452, + 488 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 40 + } + } + } + ], + "range": [ + 411, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 14 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "range": [ + 406, + 493 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 22, + "column": 4 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "UnaryExpression", + "argument": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 435, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 430, + 441 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 430, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 428, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "operator": "~", + "prefix": true, + "range": [ + 427, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "range": [ + 423, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 406, + 407 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 485, + 486 + ], + "loc": { + "start": { + "line": 21, + "column": 37 + }, + "end": { + "line": 21, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 430, + 434 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 452, + 456 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 53, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 471, + 475 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 307, + 311 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 609, + 619 + ], + "loc": { + "start": { + "line": 33, + "column": 7 + }, + "end": { + "line": 33, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 609, + 619 + ], + "loc": { + "start": { + "line": 33, + "column": 7 + }, + "end": { + "line": 33, + "column": 17 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "typewriter", + "range": [ + 42, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Node", + "range": [ + 165, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 35 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Error", + "range": [ + 215, + 220 + ], + "loc": { + "start": { + "line": 11, + "column": 13 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json new file mode 100644 index 00000000..b4383e8b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json @@ -0,0 +1,457 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 108, + 113 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 154, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$count", + "range": [ + 76, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 108, + 113 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 154, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 200, + 205 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json new file mode 100644 index 00000000..49ccd447 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json @@ -0,0 +1,654 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "user", + "identifiers": [ + { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "firstname", + "range": [ + 25, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Ada'", + "value": "Ada", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 25, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "lastname", + "range": [ + 45, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Lovelace'", + "value": "Lovelace", + "range": [ + 55, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 45, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "range": [ + 21, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + "range": [ + 14, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 100, + 104 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 100, + 104 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 179, + 183 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json new file mode 100644 index 00000000..abf9aefd --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json @@ -0,0 +1,725 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "user", + "identifiers": [ + { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "firstname", + "range": [ + 25, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Ada'", + "value": "Ada", + "range": [ + 36, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 25, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "lastname", + "range": [ + 45, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Lovelace'", + "value": "Lovelace", + "range": [ + 55, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "range": [ + 45, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "range": [ + 21, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 5, + "column": 2 + } + } + }, + "range": [ + 14, + 68 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 5, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 100, + 104 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 100, + 104 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 161, + 165 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 167, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 167, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 167, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json new file mode 100644 index 00000000..045eb8b9 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Nested", + "identifiers": [ + { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 60, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 60, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json new file mode 100644 index 00000000..c2e1562f --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json @@ -0,0 +1,240 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "answer", + "identifiers": [ + { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "init": null, + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 58, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json new file mode 100644 index 00000000..045eb8b9 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Nested", + "identifiers": [ + { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 60, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 60, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json new file mode 100644 index 00000000..3ff37e2b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json @@ -0,0 +1,338 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "answer", + "identifiers": [ + { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "init": { + "type": "Literal", + "raw": "'a mystery'", + "value": "a mystery", + "range": [ + 30, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + "range": [ + 21, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 72, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 21, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json new file mode 100644 index 00000000..de8ad023 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json @@ -0,0 +1,20918 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "quintOut", + "identifiers": [ + { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "crossfade", + "identifiers": [ + { + "type": "Identifier", + "name": "crossfade", + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "local": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 126, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ] + }, + { + "name": "send", + "identifiers": [ + { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ArrayPattern", + "elements": [ + { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "range": [ + 108, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 140, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "d", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 169, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "range": [ + 165, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 155, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "range": [ + 150, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "range": [ + 140, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "fallback", + "range": [ + 178, + 186 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 220, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 212, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "range": [ + 206, + 243 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 305, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 61 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 299, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 294, + 296 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 271, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "range": [ + 265, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 285, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 253, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 70 + } + } + } + ], + "range": [ + 247, + 315 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 333, + 341 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 343, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 333, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 352, + 358 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "range": [ + 352, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 374, + 377 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 384, + 404 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 413, + 423 + ], + "loc": { + "start": { + "line": 16, + "column": 27 + }, + "end": { + "line": 16, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 38 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 384, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "range": [ + 379, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 374, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 327, + 457 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "range": [ + 320, + 458 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 201, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + } + ], + "range": [ + 186, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "range": [ + 178, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + ], + "range": [ + 136, + 465 + ], + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 21, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 126, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 126, + 466 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 108, + 466 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 21, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1481, + 1485 + ], + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1841, + 1845 + ], + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + } + ] + }, + { + "name": "receive", + "identifiers": [ + { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ArrayPattern", + "elements": [ + { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "range": [ + 108, + 123 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 140, + 148 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "d", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 169, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "range": [ + 165, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 155, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "range": [ + 150, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "range": [ + 140, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "fallback", + "range": [ + 178, + 186 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "method": true, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 220, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 212, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "range": [ + 206, + 243 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 305, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 61 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 299, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 294, + 296 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 271, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "range": [ + 265, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 285, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 253, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 70 + } + } + } + ], + "range": [ + 247, + 315 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 333, + 341 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 343, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 333, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 352, + 358 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "range": [ + 352, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 374, + 377 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 384, + 404 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 413, + 423 + ], + "loc": { + "start": { + "line": 16, + "column": 27 + }, + "end": { + "line": 16, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 38 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 384, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "range": [ + 379, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 374, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 327, + 457 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "range": [ + 320, + 458 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 201, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + } + ], + "range": [ + 186, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "range": [ + 178, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + ], + "range": [ + 136, + 465 + ], + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 21, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 126, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 126, + 466 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 108, + 466 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 21, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1446, + 1453 + ], + "loc": { + "start": { + "line": 66, + "column": 7 + }, + "end": { + "line": 66, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1806, + 1813 + ], + "loc": { + "start": { + "line": 80, + "column": 7 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ] + }, + { + "name": "uid", + "identifiers": [ + { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 23, + "column": 11 + }, + "end": { + "line": 23, + "column": 12 + } + } + }, + "range": [ + 474, + 481 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 507, + 510 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 569, + 572 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 639, + 642 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 699, + 702 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 758, + 761 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 820, + 823 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + } + ] + }, + { + "name": "todos", + "identifiers": [ + { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 503, + 505 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 507, + 510 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "range": [ + 503, + 512 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 520, + 525 + ], + "loc": { + "start": { + "line": 26, + "column": 21 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "range": [ + 514, + 525 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 527, + 538 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'write some docs'", + "value": "write some docs", + "range": [ + 540, + 557 + ], + "loc": { + "start": { + "line": 26, + "column": 41 + }, + "end": { + "line": 26, + "column": 58 + } + } + }, + "range": [ + 527, + 557 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 58 + } + } + } + ], + "range": [ + 501, + 559 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 60 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 565, + 567 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 569, + 572 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 569, + 574 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "range": [ + 565, + 574 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 576, + 580 + ], + "loc": { + "start": { + "line": 27, + "column": 15 + }, + "end": { + "line": 27, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 582, + 587 + ], + "loc": { + "start": { + "line": 27, + "column": 21 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 576, + 587 + ], + "loc": { + "start": { + "line": 27, + "column": 15 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 589, + 600 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'start writing blog post'", + "value": "start writing blog post", + "range": [ + 602, + 627 + ], + "loc": { + "start": { + "line": 27, + "column": 41 + }, + "end": { + "line": 27, + "column": 66 + } + } + }, + "range": [ + 589, + 627 + ], + "loc": { + "start": { + "line": 27, + "column": 28 + }, + "end": { + "line": 27, + "column": 66 + } + } + } + ], + "range": [ + 563, + 629 + ], + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 27, + "column": 68 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 635, + 637 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 639, + 642 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 639, + 644 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 13 + } + } + }, + "range": [ + 635, + 644 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 646, + 650 + ], + "loc": { + "start": { + "line": 28, + "column": 15 + }, + "end": { + "line": 28, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 652, + 656 + ], + "loc": { + "start": { + "line": 28, + "column": 21 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + "range": [ + 646, + 656 + ], + "loc": { + "start": { + "line": 28, + "column": 15 + }, + "end": { + "line": 28, + "column": 25 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 659, + 670 + ], + "loc": { + "start": { + "line": 28, + "column": 28 + }, + "end": { + "line": 28, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'buy some milk'", + "value": "buy some milk", + "range": [ + 672, + 687 + ], + "loc": { + "start": { + "line": 28, + "column": 41 + }, + "end": { + "line": 28, + "column": 56 + } + } + }, + "range": [ + 659, + 687 + ], + "loc": { + "start": { + "line": 28, + "column": 28 + }, + "end": { + "line": 28, + "column": 56 + } + } + } + ], + "range": [ + 633, + 689 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 58 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 695, + 697 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 699, + 702 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 699, + 704 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "range": [ + 695, + 704 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 706, + 710 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 712, + 717 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 26 + } + } + }, + "range": [ + 706, + 717 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 719, + 730 + ], + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'mow the lawn'", + "value": "mow the lawn", + "range": [ + 732, + 746 + ], + "loc": { + "start": { + "line": 29, + "column": 41 + }, + "end": { + "line": 29, + "column": 55 + } + } + }, + "range": [ + 719, + 746 + ], + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 55 + } + } + } + ], + "range": [ + 693, + 748 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 57 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 754, + 756 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 758, + 761 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 758, + 763 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 13 + } + } + }, + "range": [ + 754, + 763 + ], + "loc": { + "start": { + "line": 30, + "column": 4 + }, + "end": { + "line": 30, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 765, + 769 + ], + "loc": { + "start": { + "line": 30, + "column": 15 + }, + "end": { + "line": 30, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 771, + 776 + ], + "loc": { + "start": { + "line": 30, + "column": 21 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + "range": [ + 765, + 776 + ], + "loc": { + "start": { + "line": 30, + "column": 15 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 778, + 789 + ], + "loc": { + "start": { + "line": 30, + "column": 28 + }, + "end": { + "line": 30, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'feed the turtle'", + "value": "feed the turtle", + "range": [ + 791, + 808 + ], + "loc": { + "start": { + "line": 30, + "column": 41 + }, + "end": { + "line": 30, + "column": 58 + } + } + }, + "range": [ + 778, + 808 + ], + "loc": { + "start": { + "line": 30, + "column": 28 + }, + "end": { + "line": 30, + "column": 58 + } + } + } + ], + "range": [ + 752, + 810 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 60 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 816, + 818 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 820, + 823 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 820, + 825 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + "range": [ + 816, + 825 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 13 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 827, + 831 + ], + "loc": { + "start": { + "line": 31, + "column": 15 + }, + "end": { + "line": 31, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 833, + 838 + ], + "loc": { + "start": { + "line": 31, + "column": 21 + }, + "end": { + "line": 31, + "column": 26 + } + } + }, + "range": [ + 827, + 838 + ], + "loc": { + "start": { + "line": 31, + "column": 15 + }, + "end": { + "line": 31, + "column": 26 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 840, + 851 + ], + "loc": { + "start": { + "line": 31, + "column": 28 + }, + "end": { + "line": 31, + "column": 39 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'fix some bugs'", + "value": "fix some bugs", + "range": [ + 853, + 868 + ], + "loc": { + "start": { + "line": 31, + "column": 41 + }, + "end": { + "line": 31, + "column": 56 + } + } + }, + "range": [ + 840, + 868 + ], + "loc": { + "start": { + "line": 31, + "column": 28 + }, + "end": { + "line": 31, + "column": 56 + } + } + } + ], + "range": [ + 814, + 870 + ], + "loc": { + "start": { + "line": 31, + "column": 2 + }, + "end": { + "line": 31, + "column": 58 + } + } + } + ], + "range": [ + 497, + 874 + ], + "loc": { + "start": { + "line": 25, + "column": 13 + }, + "end": { + "line": 32, + "column": 2 + } + } + }, + "range": [ + 489, + 874 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 32, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 983, + 988 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1001, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 41, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1060, + 1065 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1068, + 1073 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1170, + 1175 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1178, + 1183 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1383, + 1388 + ], + "loc": { + "start": { + "line": 64, + "column": 9 + }, + "end": { + "line": 64, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1731, + 1736 + ], + "loc": { + "start": { + "line": 78, + "column": 9 + }, + "end": { + "line": 78, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + } + ] + }, + { + "name": "add", + "identifiers": [ + { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 920, + 922 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 924, + 929 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "range": [ + 920, + 929 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 934, + 938 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 940, + 945 + ], + "loc": { + "start": { + "line": 37, + "column": 9 + }, + "end": { + "line": 37, + "column": 14 + } + } + }, + "range": [ + 934, + 945 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 950, + 961 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 963, + 968 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 969, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 22 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 963, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 950, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 27 + } + } + } + ], + "range": [ + 915, + 978 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 39, + "column": 3 + } + } + }, + "range": [ + 908, + 978 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 39, + "column": 3 + } + } + } + ], + "range": [ + 902, + 979 + ], + "loc": { + "start": { + "line": 35, + "column": 2 + }, + "end": { + "line": 39, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 983, + 988 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 992, + 996 + ], + "loc": { + "start": { + "line": 41, + "column": 11 + }, + "end": { + "line": 41, + "column": 15 + } + } + }, + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [ + 1001, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 41, + "column": 25 + } + } + }, + "range": [ + 998, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 17 + }, + "end": { + "line": 41, + "column": 25 + } + } + } + ], + "range": [ + 991, + 1007 + ], + "loc": { + "start": { + "line": 41, + "column": 10 + }, + "end": { + "line": 41, + "column": 26 + } + } + }, + "range": [ + 983, + 1007 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 26 + } + } + }, + "range": [ + 983, + 1008 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 27 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1011, + 1016 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1017, + 1022 + ], + "loc": { + "start": { + "line": 42, + "column": 8 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + "range": [ + 1011, + 1022 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 1025, + 1027 + ], + "loc": { + "start": { + "line": 42, + "column": 16 + }, + "end": { + "line": 42, + "column": 18 + } + } + }, + "range": [ + 1011, + 1027 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 18 + } + } + }, + "range": [ + 1011, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 19 + } + } + } + ], + "range": [ + 898, + 1031 + ], + "loc": { + "start": { + "line": 34, + "column": 21 + }, + "end": { + "line": 43, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + ], + "range": [ + 878, + 1031 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 43, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 1319, + 1322 + ], + "loc": { + "start": { + "line": 59, + "column": 40 + }, + "end": { + "line": 59, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + } + } + ] + }, + { + "name": "remove", + "identifiers": [ + { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1060, + 1065 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 1086, + 1087 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "todo", + "range": [ + 1092, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 34 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "range": [ + 1086, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + } + ], + "range": [ + 1081, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1068, + 1073 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1074, + 1080 + ], + "loc": { + "start": { + "line": 46, + "column": 16 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "range": [ + 1068, + 1080 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1068, + 1097 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 39 + } + } + }, + "range": [ + 1060, + 1097 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 39 + } + } + }, + "range": [ + 1060, + 1098 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 40 + } + } + } + ], + "range": [ + 1056, + 1101 + ], + "loc": { + "start": { + "line": 45, + "column": 23 + }, + "end": { + "line": 47, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + } + ], + "range": [ + 1034, + 1101 + ], + "loc": { + "start": { + "line": 45, + "column": 1 + }, + "end": { + "line": 47, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1154, + 1160 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1623, + 1629 + ], + "loc": { + "start": { + "line": 71, + "column": 29 + }, + "end": { + "line": 71, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1988, + 1994 + ], + "loc": { + "start": { + "line": 84, + "column": 29 + }, + "end": { + "line": 84, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + } + ] + }, + { + "name": "mark", + "identifiers": [ + { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1139, + 1143 + ], + "loc": { + "start": { + "line": 50, + "column": 7 + }, + "end": { + "line": 50, + "column": 11 + } + } + }, + "range": [ + 1134, + 1143 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "done", + "range": [ + 1146, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 14 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "range": [ + 1134, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "range": [ + 1134, + 1151 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1161, + 1165 + ], + "loc": { + "start": { + "line": 51, + "column": 9 + }, + "end": { + "line": 51, + "column": 13 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1154, + 1160 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 1154, + 1166 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 14 + } + } + }, + "range": [ + 1154, + 1167 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1170, + 1175 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1191, + 1195 + ], + "loc": { + "start": { + "line": 52, + "column": 23 + }, + "end": { + "line": 52, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1178, + 1183 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 1184, + 1190 + ], + "loc": { + "start": { + "line": 52, + "column": 16 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, + "range": [ + 1178, + 1190 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1178, + 1196 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 28 + } + } + }, + "range": [ + 1170, + 1196 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 28 + } + } + }, + "range": [ + 1170, + 1197 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 29 + } + } + } + ], + "range": [ + 1130, + 1200 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 53, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + } + ], + "range": [ + 1104, + 1200 + ], + "loc": { + "start": { + "line": 49, + "column": 1 + }, + "end": { + "line": 53, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1552, + 1556 + ], + "loc": { + "start": { + "line": 69, + "column": 42 + }, + "end": { + "line": 69, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1916, + 1920 + ], + "loc": { + "start": { + "line": 82, + "column": 50 + }, + "end": { + "line": 82, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 126, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "crossfade", + "range": [ + 62, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 507, + 510 + ], + "loc": { + "start": { + "line": 26, + "column": 8 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 569, + 572 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 639, + 642 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 699, + 702 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 758, + 761 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 820, + 823 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1383, + 1388 + ], + "loc": { + "start": { + "line": 64, + "column": 9 + }, + "end": { + "line": 64, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1731, + 1736 + ], + "loc": { + "start": { + "line": 78, + "column": 9 + }, + "end": { + "line": 78, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "d", + "identifiers": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "d", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 169, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "range": [ + 165, + 172 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "sqrt", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 155, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "range": [ + 150, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "d", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "d", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "node", + "identifiers": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 220, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 212, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "range": [ + 206, + 243 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 305, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 61 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 299, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 294, + 296 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 271, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "range": [ + 265, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 285, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 253, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 70 + } + } + } + ], + "range": [ + 247, + 315 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 333, + 341 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 343, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 333, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 352, + 358 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "range": [ + 352, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 374, + 377 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 384, + 404 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 413, + 423 + ], + "loc": { + "start": { + "line": 16, + "column": 27 + }, + "end": { + "line": 16, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 38 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 384, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "range": [ + 379, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 374, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 327, + 457 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "range": [ + 320, + 458 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 201, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + } + ], + "range": [ + 186, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + } + ] + }, + { + "name": "params", + "identifiers": [ + { + "type": "Identifier", + "name": "params", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "params", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 220, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 212, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + ], + "range": [ + 206, + 243 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 305, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 61 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 299, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 294, + 296 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 271, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "range": [ + 265, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 285, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 253, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 70 + } + } + } + ], + "range": [ + 247, + 315 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 71 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 333, + 341 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "600", + "value": 600, + "range": [ + 343, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 333, + 346 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 352, + 358 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "range": [ + 352, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "css", + "range": [ + 374, + 377 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 384, + 404 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 413, + 423 + ], + "loc": { + "start": { + "line": 16, + "column": 27 + }, + "end": { + "line": 16, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 38 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 384, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "range": [ + 379, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 374, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 327, + 457 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "range": [ + 320, + 458 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 5 + } + } + } + ], + "range": [ + 201, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Identifier", + "name": "params", + "range": [ + 193, + 199 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + } + ], + "range": [ + 186, + 462 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + } + ], + "references": [] + }, + { + "name": "style", + "identifiers": [ + { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "optional": false, + "range": [ + 220, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 39 + } + } + }, + "range": [ + 212, + 242 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 39 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + } + ] + }, + { + "name": "transform", + "identifiers": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 305, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 61 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 299, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "consequent": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 294, + 296 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 52 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 271, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "range": [ + 265, + 280 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'none'", + "value": "none", + "range": [ + 285, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 41 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 291 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "range": [ + 265, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 70 + } + } + }, + "range": [ + 253, + 314 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 70 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "node", + "range": [ + 237, + 241 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "node", + "range": [ + 187, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "style", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 10, + "column": 55 + }, + "end": { + "line": 10, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "\n\t\t\t\t\ttransform: ", + "raw": "\n\t\t\t\t\ttransform: " + }, + "range": [ + 384, + 404 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 16, + "column": 18 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " scale(", + "raw": " scale(" + }, + "range": [ + 413, + 423 + ], + "loc": { + "start": { + "line": 16, + "column": 27 + }, + "end": { + "line": 16, + "column": 37 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ");\n\t\t\t\t\topacity: ", + "raw": ");\n\t\t\t\t\topacity: " + }, + "range": [ + 424, + 444 + ], + "loc": { + "start": { + "line": 16, + "column": 38 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\n\t\t\t\t", + "raw": "\n\t\t\t\t" + }, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + ], + "range": [ + 384, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + ], + "range": [ + 379, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 18, + "column": 5 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 444, + 445 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "transform", + "range": [ + 404, + 413 + ], + "loc": { + "start": { + "line": 16, + "column": 18 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "transform", + "range": [ + 253, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 18 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 360, + 368 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "quintOut", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "input", + "identifiers": [ + { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 920, + 922 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 924, + 929 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "range": [ + 920, + 929 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 934, + 938 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 940, + 945 + ], + "loc": { + "start": { + "line": 37, + "column": 9 + }, + "end": { + "line": 37, + "column": 14 + } + } + }, + "range": [ + 934, + 945 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 950, + 961 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 963, + 968 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 969, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 22 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 963, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 950, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 27 + } + } + } + ], + "range": [ + 915, + 978 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 39, + "column": 3 + } + } + }, + "range": [ + 908, + 978 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 39, + "column": 3 + } + } + } + ], + "range": [ + 902, + 979 + ], + "loc": { + "start": { + "line": 35, + "column": 2 + }, + "end": { + "line": 39, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 983, + 988 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 992, + 996 + ], + "loc": { + "start": { + "line": 41, + "column": 11 + }, + "end": { + "line": 41, + "column": 15 + } + } + }, + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [ + 1001, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 41, + "column": 25 + } + } + }, + "range": [ + 998, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 17 + }, + "end": { + "line": 41, + "column": 25 + } + } + } + ], + "range": [ + 991, + 1007 + ], + "loc": { + "start": { + "line": 41, + "column": 10 + }, + "end": { + "line": 41, + "column": 26 + } + } + }, + "range": [ + 983, + 1007 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 26 + } + } + }, + "range": [ + 983, + 1008 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 27 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 1011, + 1016 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 1017, + 1022 + ], + "loc": { + "start": { + "line": 42, + "column": 8 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + "range": [ + 1011, + 1022 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 1025, + 1027 + ], + "loc": { + "start": { + "line": 42, + "column": 16 + }, + "end": { + "line": 42, + "column": 18 + } + } + }, + "range": [ + 1011, + 1027 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 18 + } + } + }, + "range": [ + 1011, + 1028 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 19 + } + } + } + ], + "range": [ + 898, + 1031 + ], + "loc": { + "start": { + "line": 34, + "column": 21 + }, + "end": { + "line": 43, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + ], + "range": [ + 878, + 1031 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 43, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 963, + 968 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 1011, + 1016 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + } + ] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 920, + 922 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 5 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "uid", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 924, + 929 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + "range": [ + 920, + 929 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 934, + 938 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 940, + 945 + ], + "loc": { + "start": { + "line": 37, + "column": 9 + }, + "end": { + "line": 37, + "column": 14 + } + } + }, + "range": [ + 934, + 945 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "description", + "range": [ + 950, + 961 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 14 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "input", + "range": [ + 963, + 968 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 969, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 22 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 963, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 950, + 974 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 27 + } + } + } + ], + "range": [ + 915, + 978 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 39, + "column": 3 + } + } + }, + "range": [ + 908, + 978 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 39, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 992, + 996 + ], + "loc": { + "start": { + "line": 41, + "column": 11 + }, + "end": { + "line": 41, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 963, + 968 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 983, + 988 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 992, + 996 + ], + "loc": { + "start": { + "line": 41, + "column": 11 + }, + "end": { + "line": 41, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 908, + 912 + ], + "loc": { + "start": { + "line": 35, + "column": 8 + }, + "end": { + "line": 35, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1001, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 41, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "input", + "range": [ + 1011, + 1016 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 42, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "input", + "range": [ + 891, + 896 + ], + "loc": { + "start": { + "line": 34, + "column": 14 + }, + "end": { + "line": 34, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "uid", + "range": [ + 924, + 927 + ], + "loc": { + "start": { + "line": 36, + "column": 7 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "uid", + "range": [ + 474, + 477 + ], + "loc": { + "start": { + "line": 23, + "column": 5 + }, + "end": { + "line": 23, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 983, + 988 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1001, + 1006 + ], + "loc": { + "start": { + "line": 41, + "column": 20 + }, + "end": { + "line": 41, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1060, + 1065 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 1086, + 1087 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "todo", + "range": [ + 1092, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 34 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "range": [ + 1086, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + } + ], + "range": [ + 1081, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 38 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1068, + 1073 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1074, + 1080 + ], + "loc": { + "start": { + "line": 46, + "column": 16 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "range": [ + 1068, + 1080 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1068, + 1097 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 39 + } + } + }, + "range": [ + 1060, + 1097 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 39 + } + } + }, + "range": [ + 1060, + 1098 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 40 + } + } + } + ], + "range": [ + 1056, + 1101 + ], + "loc": { + "start": { + "line": 45, + "column": 23 + }, + "end": { + "line": 47, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + } + ], + "range": [ + 1034, + 1101 + ], + "loc": { + "start": { + "line": 45, + "column": 1 + }, + "end": { + "line": 47, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1092, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 34 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1060, + 1065 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1068, + 1073 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 1086, + 1087 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "todo", + "range": [ + 1092, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 34 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "range": [ + 1086, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + } + ], + "range": [ + 1081, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1086, + 1087 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1086, + 1087 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1081, + 1082 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1092, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 34 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1092, + 1096 + ], + "loc": { + "start": { + "line": 46, + "column": 34 + }, + "end": { + "line": 46, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1050, + 1054 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 21 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1060, + 1065 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1068, + 1073 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1139, + 1143 + ], + "loc": { + "start": { + "line": 50, + "column": 7 + }, + "end": { + "line": 50, + "column": 11 + } + } + }, + "range": [ + 1134, + 1143 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "done", + "range": [ + 1146, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 14 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "range": [ + 1134, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "range": [ + 1134, + 1151 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1161, + 1165 + ], + "loc": { + "start": { + "line": 51, + "column": 9 + }, + "end": { + "line": 51, + "column": 13 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1154, + 1160 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 1154, + 1166 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 14 + } + } + }, + "range": [ + 1154, + 1167 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1170, + 1175 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1191, + 1195 + ], + "loc": { + "start": { + "line": 52, + "column": 23 + }, + "end": { + "line": 52, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1178, + 1183 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 1184, + 1190 + ], + "loc": { + "start": { + "line": 52, + "column": 16 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, + "range": [ + 1178, + 1190 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1178, + 1196 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 28 + } + } + }, + "range": [ + 1170, + 1196 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 28 + } + } + }, + "range": [ + 1170, + 1197 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 29 + } + } + } + ], + "range": [ + 1130, + 1200 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 53, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + } + ], + "range": [ + 1104, + 1200 + ], + "loc": { + "start": { + "line": 49, + "column": 1 + }, + "end": { + "line": 53, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1161, + 1165 + ], + "loc": { + "start": { + "line": 51, + "column": 9 + }, + "end": { + "line": 51, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1191, + 1195 + ], + "loc": { + "start": { + "line": 52, + "column": 23 + }, + "end": { + "line": 52, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + } + ] + }, + { + "name": "done", + "identifiers": [ + { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1139, + 1143 + ], + "loc": { + "start": { + "line": 50, + "column": 7 + }, + "end": { + "line": 50, + "column": 11 + } + } + }, + "range": [ + 1134, + 1143 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "done", + "range": [ + 1146, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 14 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "range": [ + 1134, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "range": [ + 1134, + 1151 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1161, + 1165 + ], + "loc": { + "start": { + "line": 51, + "column": 9 + }, + "end": { + "line": 51, + "column": 13 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1154, + 1160 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 1154, + 1166 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 14 + } + } + }, + "range": [ + 1154, + 1167 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 1170, + 1175 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1191, + 1195 + ], + "loc": { + "start": { + "line": 52, + "column": 23 + }, + "end": { + "line": 52, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1178, + 1183 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 1184, + 1190 + ], + "loc": { + "start": { + "line": 52, + "column": 16 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, + "range": [ + 1178, + 1190 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1178, + 1196 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 28 + } + } + }, + "range": [ + 1170, + 1196 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 28 + } + } + }, + "range": [ + 1170, + 1197 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 29 + } + } + } + ], + "range": [ + 1130, + 1200 + ], + "loc": { + "start": { + "line": 49, + "column": 27 + }, + "end": { + "line": 53, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + } + ], + "range": [ + 1104, + 1200 + ], + "loc": { + "start": { + "line": 49, + "column": 1 + }, + "end": { + "line": 53, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [ + 1146, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 14 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1134, + 1138 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [ + 1146, + 1150 + ], + "loc": { + "start": { + "line": 50, + "column": 14 + }, + "end": { + "line": 50, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [ + 1124, + 1128 + ], + "loc": { + "start": { + "line": 49, + "column": 21 + }, + "end": { + "line": 49, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1154, + 1160 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1161, + 1165 + ], + "loc": { + "start": { + "line": 51, + "column": 9 + }, + "end": { + "line": 51, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1170, + 1175 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1178, + 1183 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1191, + 1195 + ], + "loc": { + "start": { + "line": 52, + "column": 23 + }, + "end": { + "line": 52, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1118, + 1122 + ], + "loc": { + "start": { + "line": 49, + "column": 15 + }, + "end": { + "line": 49, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1154, + 1160 + ], + "loc": { + "start": { + "line": 51, + "column": 2 + }, + "end": { + "line": 51, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1170, + 1175 + ], + "loc": { + "start": { + "line": 52, + "column": 2 + }, + "end": { + "line": 52, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 1178, + 1183 + ], + "loc": { + "start": { + "line": 52, + "column": 10 + }, + "end": { + "line": 52, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 489, + 494 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "LogicalExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 1298, + 1299 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 1300, + 1303 + ], + "loc": { + "start": { + "line": 59, + "column": 21 + }, + "end": { + "line": 59, + "column": 24 + } + } + }, + "range": [ + 1298, + 1303 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 24 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 1308, + 1315 + ], + "loc": { + "start": { + "line": 59, + "column": 29 + }, + "end": { + "line": 59, + "column": 36 + } + } + }, + "range": [ + 1298, + 1315 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 36 + } + } + }, + "operator": "&&", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 1323, + 1324 + ], + "loc": { + "start": { + "line": 59, + "column": 44 + }, + "end": { + "line": 59, + "column": 45 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 1325, + 1331 + ], + "loc": { + "start": { + "line": 59, + "column": 46 + }, + "end": { + "line": 59, + "column": 52 + } + } + }, + "range": [ + 1323, + 1331 + ], + "loc": { + "start": { + "line": 59, + "column": 44 + }, + "end": { + "line": 59, + "column": 52 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "add", + "range": [ + 1319, + 1322 + ], + "loc": { + "start": { + "line": 59, + "column": 40 + }, + "end": { + "line": 59, + "column": 43 + } + } + }, + "optional": false, + "range": [ + 1319, + 1332 + ], + "loc": { + "start": { + "line": 59, + "column": 40 + }, + "end": { + "line": 59, + "column": 53 + } + } + }, + "range": [ + 1298, + 1332 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 53 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + } + ], + "range": [ + 1293, + 1332 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 53 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1298, + 1299 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1323, + 1324 + ], + "loc": { + "start": { + "line": 59, + "column": 44 + }, + "end": { + "line": 59, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1298, + 1299 + ], + "loc": { + "start": { + "line": 59, + "column": 19 + }, + "end": { + "line": 59, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 1319, + 1322 + ], + "loc": { + "start": { + "line": 59, + "column": 40 + }, + "end": { + "line": 59, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 1323, + 1324 + ], + "loc": { + "start": { + "line": 59, + "column": 44 + }, + "end": { + "line": 59, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 1293, + 1294 + ], + "loc": { + "start": { + "line": 59, + "column": 14 + }, + "end": { + "line": 59, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 1319, + 1322 + ], + "loc": { + "start": { + "line": 59, + "column": 40 + }, + "end": { + "line": 59, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 887, + 890 + ], + "loc": { + "start": { + "line": 34, + "column": 10 + }, + "end": { + "line": 34, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1396, + 1397 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 1396, + 1397 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1402, + 1403 + ], + "loc": { + "start": { + "line": 64, + "column": 28 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1404, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 30 + }, + "end": { + "line": 64, + "column": 34 + } + } + }, + "range": [ + 1402, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 28 + }, + "end": { + "line": 64, + "column": 34 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 1401, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 64, + "column": 34 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1396, + 1397 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 23 + } + } + } + ], + "range": [ + 1396, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1402, + 1403 + ], + "loc": { + "start": { + "line": 64, + "column": 28 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1396, + 1397 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1402, + 1403 + ], + "loc": { + "start": { + "line": 64, + "column": 28 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1396, + 1397 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1402, + 1403 + ], + "loc": { + "start": { + "line": 64, + "column": 28 + }, + "end": { + "line": 64, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1404, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 30 + }, + "end": { + "line": 64, + "column": 34 + } + } + }, + "range": [ + 1402, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 28 + }, + "end": { + "line": 64, + "column": 34 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 1401, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 27 + }, + "end": { + "line": 64, + "column": 34 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1396, + 1397 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 23 + } + } + } + ], + "range": [ + 1396, + 1408 + ], + "loc": { + "start": { + "line": 64, + "column": 22 + }, + "end": { + "line": 64, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1383, + 1388 + ], + "loc": { + "start": { + "line": 64, + "column": 9 + }, + "end": { + "line": 64, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1389, + 1395 + ], + "loc": { + "start": { + "line": 64, + "column": 15 + }, + "end": { + "line": 64, + "column": 21 + } + } + }, + "range": [ + 1383, + 1395 + ], + "loc": { + "start": { + "line": 64, + "column": 9 + }, + "end": { + "line": 64, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 1383, + 1409 + ], + "loc": { + "start": { + "line": 64, + "column": 9 + }, + "end": { + "line": 64, + "column": 35 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + }, + "index": null, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1419, + 1423 + ], + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1424, + 1426 + ], + "loc": { + "start": { + "line": 64, + "column": 50 + }, + "end": { + "line": 64, + "column": 52 + } + } + }, + "range": [ + 1419, + 1426 + ], + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 52 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "label", + "range": [ + 1433, + 1438 + ], + "loc": { + "start": { + "line": 65, + "column": 4 + }, + "end": { + "line": 65, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "receive", + "range": [ + 1446, + 1453 + ], + "loc": { + "start": { + "line": 66, + "column": 7 + }, + "end": { + "line": 66, + "column": 14 + } + } + }, + "modifiers": [], + "range": [ + 1443, + 1453 + ], + "loc": { + "start": { + "line": 66, + "column": 4 + }, + "end": { + "line": 66, + "column": 14 + } + } + }, + "intro": true, + "outro": false, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1457, + 1460 + ], + "loc": { + "start": { + "line": 66, + "column": 18 + }, + "end": { + "line": 66, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1462, + 1466 + ], + "loc": { + "start": { + "line": 66, + "column": 23 + }, + "end": { + "line": 66, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1467, + 1469 + ], + "loc": { + "start": { + "line": 66, + "column": 28 + }, + "end": { + "line": 66, + "column": 30 + } + } + }, + "range": [ + 1462, + 1469 + ], + "loc": { + "start": { + "line": 66, + "column": 23 + }, + "end": { + "line": 66, + "column": 30 + } + } + }, + "range": [ + 1457, + 1469 + ], + "loc": { + "start": { + "line": 66, + "column": 18 + }, + "end": { + "line": 66, + "column": 30 + } + } + } + ], + "range": [ + 1456, + 1470 + ], + "loc": { + "start": { + "line": 66, + "column": 17 + }, + "end": { + "line": 66, + "column": 31 + } + } + }, + "range": [ + 1443, + 1472 + ], + "loc": { + "start": { + "line": 66, + "column": 4 + }, + "end": { + "line": 66, + "column": 33 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "send", + "range": [ + 1481, + 1485 + ], + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "modifiers": [], + "range": [ + 1477, + 1485 + ], + "loc": { + "start": { + "line": 67, + "column": 4 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "intro": false, + "outro": true, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1489, + 1492 + ], + "loc": { + "start": { + "line": 67, + "column": 16 + }, + "end": { + "line": 67, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1494, + 1498 + ], + "loc": { + "start": { + "line": 67, + "column": 21 + }, + "end": { + "line": 67, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1499, + 1501 + ], + "loc": { + "start": { + "line": 67, + "column": 26 + }, + "end": { + "line": 67, + "column": 28 + } + } + }, + "range": [ + 1494, + 1501 + ], + "loc": { + "start": { + "line": 67, + "column": 21 + }, + "end": { + "line": 67, + "column": 28 + } + } + }, + "range": [ + 1489, + 1501 + ], + "loc": { + "start": { + "line": 67, + "column": 16 + }, + "end": { + "line": 67, + "column": 28 + } + } + } + ], + "range": [ + 1488, + 1502 + ], + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 29 + } + } + }, + "range": [ + 1477, + 1504 + ], + "loc": { + "start": { + "line": 67, + "column": 4 + }, + "end": { + "line": 67, + "column": 31 + } + } + } + ], + "selfClosing": false, + "range": [ + 1432, + 1509 + ], + "loc": { + "start": { + "line": 65, + "column": 3 + }, + "end": { + "line": 68, + "column": 4 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1509, + 1514 + ], + "loc": { + "start": { + "line": 68, + "column": 4 + }, + "end": { + "line": 69, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 1515, + 1520 + ], + "loc": { + "start": { + "line": 69, + "column": 5 + }, + "end": { + "line": 69, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "type", + "range": [ + 1521, + 1525 + ], + "loc": { + "start": { + "line": 69, + "column": 11 + }, + "end": { + "line": 69, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "checkbox", + "range": [ + 1526, + 1534 + ], + "loc": { + "start": { + "line": 69, + "column": 16 + }, + "end": { + "line": 69, + "column": 24 + } + } + } + ], + "range": [ + 1521, + 1534 + ], + "loc": { + "start": { + "line": 69, + "column": 11 + }, + "end": { + "line": 69, + "column": 24 + } + } + }, + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "change", + "range": [ + 1538, + 1544 + ], + "loc": { + "start": { + "line": 69, + "column": 28 + }, + "end": { + "line": 69, + "column": 34 + } + } + }, + "modifiers": [], + "range": [ + 1535, + 1544 + ], + "loc": { + "start": { + "line": 69, + "column": 25 + }, + "end": { + "line": 69, + "column": 34 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 47 + }, + "end": { + "line": 69, + "column": 51 + } + } + }, + { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 1563, + 1567 + ], + "loc": { + "start": { + "line": 69, + "column": 53 + }, + "end": { + "line": 69, + "column": 57 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "mark", + "range": [ + 1552, + 1556 + ], + "loc": { + "start": { + "line": 69, + "column": 42 + }, + "end": { + "line": 69, + "column": 46 + } + } + }, + "optional": false, + "range": [ + 1552, + 1568 + ], + "loc": { + "start": { + "line": 69, + "column": 42 + }, + "end": { + "line": 69, + "column": 58 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 1546, + 1568 + ], + "loc": { + "start": { + "line": 69, + "column": 36 + }, + "end": { + "line": 69, + "column": 58 + } + } + }, + "range": [ + 1535, + 1569 + ], + "loc": { + "start": { + "line": 69, + "column": 25 + }, + "end": { + "line": 69, + "column": 59 + } + } + } + ], + "selfClosing": false, + "range": [ + 1514, + 1570 + ], + "loc": { + "start": { + "line": 69, + "column": 4 + }, + "end": { + "line": 69, + "column": 60 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 1514, + 1570 + ], + "loc": { + "start": { + "line": 69, + "column": 4 + }, + "end": { + "line": 69, + "column": 60 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1570, + 1575 + ], + "loc": { + "start": { + "line": 69, + "column": 60 + }, + "end": { + "line": 70, + "column": 4 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1576, + 1580 + ], + "loc": { + "start": { + "line": 70, + "column": 5 + }, + "end": { + "line": 70, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "description", + "range": [ + 1581, + 1592 + ], + "loc": { + "start": { + "line": 70, + "column": 10 + }, + "end": { + "line": 70, + "column": 21 + } + } + }, + "range": [ + 1576, + 1592 + ], + "loc": { + "start": { + "line": 70, + "column": 5 + }, + "end": { + "line": 70, + "column": 21 + } + } + }, + "range": [ + 1575, + 1593 + ], + "loc": { + "start": { + "line": 70, + "column": 4 + }, + "end": { + "line": 70, + "column": 22 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1593, + 1598 + ], + "loc": { + "start": { + "line": 70, + "column": 22 + }, + "end": { + "line": 71, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 1599, + 1605 + ], + "loc": { + "start": { + "line": 71, + "column": 5 + }, + "end": { + "line": 71, + "column": 11 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 1609, + 1614 + ], + "loc": { + "start": { + "line": 71, + "column": 15 + }, + "end": { + "line": 71, + "column": 20 + } + } + }, + "modifiers": [], + "range": [ + 1606, + 1614 + ], + "loc": { + "start": { + "line": 71, + "column": 12 + }, + "end": { + "line": 71, + "column": 20 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1630, + 1634 + ], + "loc": { + "start": { + "line": 71, + "column": 36 + }, + "end": { + "line": 71, + "column": 40 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1623, + 1629 + ], + "loc": { + "start": { + "line": 71, + "column": 29 + }, + "end": { + "line": 71, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 1623, + 1635 + ], + "loc": { + "start": { + "line": 71, + "column": 29 + }, + "end": { + "line": 71, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 1617, + 1635 + ], + "loc": { + "start": { + "line": 71, + "column": 23 + }, + "end": { + "line": 71, + "column": 41 + } + } + }, + "range": [ + 1606, + 1637 + ], + "loc": { + "start": { + "line": 71, + "column": 12 + }, + "end": { + "line": 71, + "column": 43 + } + } + } + ], + "selfClosing": false, + "range": [ + 1598, + 1638 + ], + "loc": { + "start": { + "line": 71, + "column": 4 + }, + "end": { + "line": 71, + "column": 44 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "remove", + "range": [ + 1638, + 1644 + ], + "loc": { + "start": { + "line": 71, + "column": 44 + }, + "end": { + "line": 71, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1644, + 1653 + ], + "loc": { + "start": { + "line": 71, + "column": 50 + }, + "end": { + "line": 71, + "column": 59 + } + } + }, + "range": [ + 1598, + 1653 + ], + "loc": { + "start": { + "line": 71, + "column": 4 + }, + "end": { + "line": 71, + "column": 59 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 1653, + 1657 + ], + "loc": { + "start": { + "line": 71, + "column": 59 + }, + "end": { + "line": 72, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1657, + 1665 + ], + "loc": { + "start": { + "line": 72, + "column": 3 + }, + "end": { + "line": 72, + "column": 11 + } + } + }, + "range": [ + 1432, + 1665 + ], + "loc": { + "start": { + "line": 65, + "column": 3 + }, + "end": { + "line": 72, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 1376, + 1675 + ], + "loc": { + "start": { + "line": 64, + "column": 2 + }, + "end": { + "line": 73, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1419, + 1423 + ], + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1462, + 1466 + ], + "loc": { + "start": { + "line": 66, + "column": 23 + }, + "end": { + "line": 66, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1494, + 1498 + ], + "loc": { + "start": { + "line": 67, + "column": 21 + }, + "end": { + "line": 67, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 47 + }, + "end": { + "line": 69, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1576, + 1580 + ], + "loc": { + "start": { + "line": 70, + "column": 5 + }, + "end": { + "line": 70, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1630, + 1634 + ], + "loc": { + "start": { + "line": 71, + "column": 36 + }, + "end": { + "line": 71, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1419, + 1423 + ], + "loc": { + "start": { + "line": 64, + "column": 45 + }, + "end": { + "line": 64, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1462, + 1466 + ], + "loc": { + "start": { + "line": 66, + "column": 23 + }, + "end": { + "line": 66, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1446, + 1453 + ], + "loc": { + "start": { + "line": 66, + "column": 7 + }, + "end": { + "line": 66, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1494, + 1498 + ], + "loc": { + "start": { + "line": 67, + "column": 21 + }, + "end": { + "line": 67, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1481, + 1485 + ], + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1576, + 1580 + ], + "loc": { + "start": { + "line": 70, + "column": 5 + }, + "end": { + "line": 70, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1552, + 1556 + ], + "loc": { + "start": { + "line": 69, + "column": 42 + }, + "end": { + "line": 69, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 47 + }, + "end": { + "line": 69, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1552, + 1556 + ], + "loc": { + "start": { + "line": 69, + "column": 42 + }, + "end": { + "line": 69, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1557, + 1561 + ], + "loc": { + "start": { + "line": 69, + "column": 47 + }, + "end": { + "line": 69, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1623, + 1629 + ], + "loc": { + "start": { + "line": 71, + "column": 29 + }, + "end": { + "line": 71, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1630, + 1634 + ], + "loc": { + "start": { + "line": 71, + "column": 36 + }, + "end": { + "line": 71, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1623, + 1629 + ], + "loc": { + "start": { + "line": 71, + "column": 29 + }, + "end": { + "line": 71, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1630, + 1634 + ], + "loc": { + "start": { + "line": 71, + "column": 36 + }, + "end": { + "line": 71, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1413, + 1417 + ], + "loc": { + "start": { + "line": 64, + "column": 39 + }, + "end": { + "line": 64, + "column": 43 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1446, + 1453 + ], + "loc": { + "start": { + "line": 66, + "column": 7 + }, + "end": { + "line": 66, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1481, + 1485 + ], + "loc": { + "start": { + "line": 67, + "column": 8 + }, + "end": { + "line": 67, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1552, + 1556 + ], + "loc": { + "start": { + "line": 69, + "column": 42 + }, + "end": { + "line": 69, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1623, + 1629 + ], + "loc": { + "start": { + "line": 71, + "column": 29 + }, + "end": { + "line": 71, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1744, + 1745 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 1744, + 1745 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 23 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1749, + 1750 + ], + "loc": { + "start": { + "line": 78, + "column": 27 + }, + "end": { + "line": 78, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1751, + 1755 + ], + "loc": { + "start": { + "line": 78, + "column": 29 + }, + "end": { + "line": 78, + "column": 33 + } + } + }, + "range": [ + 1749, + 1755 + ], + "loc": { + "start": { + "line": 78, + "column": 27 + }, + "end": { + "line": 78, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1744, + 1745 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 23 + } + } + } + ], + "range": [ + 1744, + 1755 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1749, + 1750 + ], + "loc": { + "start": { + "line": 78, + "column": 27 + }, + "end": { + "line": 78, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1744, + 1745 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 1749, + 1750 + ], + "loc": { + "start": { + "line": 78, + "column": 27 + }, + "end": { + "line": 78, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 1744, + 1745 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 1749, + 1750 + ], + "loc": { + "start": { + "line": 78, + "column": 27 + }, + "end": { + "line": 78, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 1751, + 1755 + ], + "loc": { + "start": { + "line": 78, + "column": 29 + }, + "end": { + "line": 78, + "column": 33 + } + } + }, + "range": [ + 1749, + 1755 + ], + "loc": { + "start": { + "line": 78, + "column": 27 + }, + "end": { + "line": 78, + "column": 33 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 1744, + 1745 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 23 + } + } + } + ], + "range": [ + 1744, + 1755 + ], + "loc": { + "start": { + "line": 78, + "column": 22 + }, + "end": { + "line": 78, + "column": 33 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 1731, + 1736 + ], + "loc": { + "start": { + "line": 78, + "column": 9 + }, + "end": { + "line": 78, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 1737, + 1743 + ], + "loc": { + "start": { + "line": 78, + "column": 15 + }, + "end": { + "line": 78, + "column": 21 + } + } + }, + "range": [ + 1731, + 1743 + ], + "loc": { + "start": { + "line": 78, + "column": 9 + }, + "end": { + "line": 78, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 1731, + 1756 + ], + "loc": { + "start": { + "line": 78, + "column": 9 + }, + "end": { + "line": 78, + "column": 34 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + }, + "index": null, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1766, + 1770 + ], + "loc": { + "start": { + "line": 78, + "column": 44 + }, + "end": { + "line": 78, + "column": 48 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1771, + 1773 + ], + "loc": { + "start": { + "line": 78, + "column": 49 + }, + "end": { + "line": 78, + "column": 51 + } + } + }, + "range": [ + 1766, + 1773 + ], + "loc": { + "start": { + "line": 78, + "column": 44 + }, + "end": { + "line": 78, + "column": 51 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "label", + "range": [ + 1780, + 1785 + ], + "loc": { + "start": { + "line": 79, + "column": 4 + }, + "end": { + "line": 79, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 1786, + 1791 + ], + "loc": { + "start": { + "line": 79, + "column": 10 + }, + "end": { + "line": 79, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "done", + "range": [ + 1793, + 1797 + ], + "loc": { + "start": { + "line": 79, + "column": 17 + }, + "end": { + "line": 79, + "column": 21 + } + } + } + ], + "range": [ + 1786, + 1798 + ], + "loc": { + "start": { + "line": 79, + "column": 10 + }, + "end": { + "line": 79, + "column": 22 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "receive", + "range": [ + 1806, + 1813 + ], + "loc": { + "start": { + "line": 80, + "column": 7 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "modifiers": [], + "range": [ + 1803, + 1813 + ], + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "intro": true, + "outro": false, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1817, + 1820 + ], + "loc": { + "start": { + "line": 80, + "column": 18 + }, + "end": { + "line": 80, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1822, + 1826 + ], + "loc": { + "start": { + "line": 80, + "column": 23 + }, + "end": { + "line": 80, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1827, + 1829 + ], + "loc": { + "start": { + "line": 80, + "column": 28 + }, + "end": { + "line": 80, + "column": 30 + } + } + }, + "range": [ + 1822, + 1829 + ], + "loc": { + "start": { + "line": 80, + "column": 23 + }, + "end": { + "line": 80, + "column": 30 + } + } + }, + "range": [ + 1817, + 1829 + ], + "loc": { + "start": { + "line": 80, + "column": 18 + }, + "end": { + "line": 80, + "column": 30 + } + } + } + ], + "range": [ + 1816, + 1830 + ], + "loc": { + "start": { + "line": 80, + "column": 17 + }, + "end": { + "line": 80, + "column": 31 + } + } + }, + "range": [ + 1803, + 1832 + ], + "loc": { + "start": { + "line": 80, + "column": 4 + }, + "end": { + "line": 80, + "column": 33 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "send", + "range": [ + 1841, + 1845 + ], + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 12 + } + } + }, + "modifiers": [], + "range": [ + 1837, + 1845 + ], + "loc": { + "start": { + "line": 81, + "column": 4 + }, + "end": { + "line": 81, + "column": 12 + } + } + }, + "intro": false, + "outro": true, + "expression": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "key", + "range": [ + 1849, + 1852 + ], + "loc": { + "start": { + "line": 81, + "column": 16 + }, + "end": { + "line": 81, + "column": 19 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1854, + 1858 + ], + "loc": { + "start": { + "line": 81, + "column": 21 + }, + "end": { + "line": 81, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 1859, + 1861 + ], + "loc": { + "start": { + "line": 81, + "column": 26 + }, + "end": { + "line": 81, + "column": 28 + } + } + }, + "range": [ + 1854, + 1861 + ], + "loc": { + "start": { + "line": 81, + "column": 21 + }, + "end": { + "line": 81, + "column": 28 + } + } + }, + "range": [ + 1849, + 1861 + ], + "loc": { + "start": { + "line": 81, + "column": 16 + }, + "end": { + "line": 81, + "column": 28 + } + } + } + ], + "range": [ + 1848, + 1862 + ], + "loc": { + "start": { + "line": 81, + "column": 15 + }, + "end": { + "line": 81, + "column": 29 + } + } + }, + "range": [ + 1837, + 1864 + ], + "loc": { + "start": { + "line": 81, + "column": 4 + }, + "end": { + "line": 81, + "column": 31 + } + } + } + ], + "selfClosing": false, + "range": [ + 1779, + 1865 + ], + "loc": { + "start": { + "line": 79, + "column": 3 + }, + "end": { + "line": 81, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1865, + 1870 + ], + "loc": { + "start": { + "line": 81, + "column": 32 + }, + "end": { + "line": 82, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 1871, + 1876 + ], + "loc": { + "start": { + "line": 82, + "column": 5 + }, + "end": { + "line": 82, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "type", + "range": [ + 1877, + 1881 + ], + "loc": { + "start": { + "line": 82, + "column": 11 + }, + "end": { + "line": 82, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "checkbox", + "range": [ + 1882, + 1890 + ], + "loc": { + "start": { + "line": 82, + "column": 16 + }, + "end": { + "line": 82, + "column": 24 + } + } + } + ], + "range": [ + 1877, + 1890 + ], + "loc": { + "start": { + "line": 82, + "column": 11 + }, + "end": { + "line": 82, + "column": 24 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "checked", + "range": [ + 1891, + 1898 + ], + "loc": { + "start": { + "line": 82, + "column": 25 + }, + "end": { + "line": 82, + "column": 32 + } + } + }, + "boolean": true, + "value": [], + "range": [ + 1891, + 1898 + ], + "loc": { + "start": { + "line": 82, + "column": 25 + }, + "end": { + "line": 82, + "column": 32 + } + } + }, + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "change", + "range": [ + 1902, + 1908 + ], + "loc": { + "start": { + "line": 82, + "column": 36 + }, + "end": { + "line": 82, + "column": 42 + } + } + }, + "modifiers": [], + "range": [ + 1899, + 1908 + ], + "loc": { + "start": { + "line": 82, + "column": 33 + }, + "end": { + "line": 82, + "column": 42 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1921, + 1925 + ], + "loc": { + "start": { + "line": 82, + "column": 55 + }, + "end": { + "line": 82, + "column": 59 + } + } + }, + { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 1927, + 1932 + ], + "loc": { + "start": { + "line": 82, + "column": 61 + }, + "end": { + "line": 82, + "column": 66 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "mark", + "range": [ + 1916, + 1920 + ], + "loc": { + "start": { + "line": 82, + "column": 50 + }, + "end": { + "line": 82, + "column": 54 + } + } + }, + "optional": false, + "range": [ + 1916, + 1933 + ], + "loc": { + "start": { + "line": 82, + "column": 50 + }, + "end": { + "line": 82, + "column": 67 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 1910, + 1933 + ], + "loc": { + "start": { + "line": 82, + "column": 44 + }, + "end": { + "line": 82, + "column": 67 + } + } + }, + "range": [ + 1899, + 1934 + ], + "loc": { + "start": { + "line": 82, + "column": 33 + }, + "end": { + "line": 82, + "column": 68 + } + } + } + ], + "selfClosing": false, + "range": [ + 1870, + 1935 + ], + "loc": { + "start": { + "line": 82, + "column": 4 + }, + "end": { + "line": 82, + "column": 69 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 1870, + 1935 + ], + "loc": { + "start": { + "line": 82, + "column": 4 + }, + "end": { + "line": 82, + "column": 69 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1935, + 1940 + ], + "loc": { + "start": { + "line": 82, + "column": 69 + }, + "end": { + "line": 83, + "column": 4 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 1941, + 1945 + ], + "loc": { + "start": { + "line": 83, + "column": 5 + }, + "end": { + "line": 83, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "description", + "range": [ + 1946, + 1957 + ], + "loc": { + "start": { + "line": 83, + "column": 10 + }, + "end": { + "line": 83, + "column": 21 + } + } + }, + "range": [ + 1941, + 1957 + ], + "loc": { + "start": { + "line": 83, + "column": 5 + }, + "end": { + "line": 83, + "column": 21 + } + } + }, + "range": [ + 1940, + 1958 + ], + "loc": { + "start": { + "line": 83, + "column": 4 + }, + "end": { + "line": 83, + "column": 22 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1958, + 1963 + ], + "loc": { + "start": { + "line": 83, + "column": 22 + }, + "end": { + "line": 84, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 1964, + 1970 + ], + "loc": { + "start": { + "line": 84, + "column": 5 + }, + "end": { + "line": 84, + "column": 11 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 1974, + 1979 + ], + "loc": { + "start": { + "line": 84, + "column": 15 + }, + "end": { + "line": 84, + "column": 20 + } + } + }, + "modifiers": [], + "range": [ + 1971, + 1979 + ], + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 20 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 1995, + 1999 + ], + "loc": { + "start": { + "line": 84, + "column": 36 + }, + "end": { + "line": 84, + "column": 40 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "remove", + "range": [ + 1988, + 1994 + ], + "loc": { + "start": { + "line": 84, + "column": 29 + }, + "end": { + "line": 84, + "column": 35 + } + } + }, + "optional": false, + "range": [ + 1988, + 2000 + ], + "loc": { + "start": { + "line": 84, + "column": 29 + }, + "end": { + "line": 84, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 1982, + 2000 + ], + "loc": { + "start": { + "line": 84, + "column": 23 + }, + "end": { + "line": 84, + "column": 41 + } + } + }, + "range": [ + 1971, + 2002 + ], + "loc": { + "start": { + "line": 84, + "column": 12 + }, + "end": { + "line": 84, + "column": 43 + } + } + } + ], + "selfClosing": false, + "range": [ + 1963, + 2003 + ], + "loc": { + "start": { + "line": 84, + "column": 4 + }, + "end": { + "line": 84, + "column": 44 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "remove", + "range": [ + 2003, + 2009 + ], + "loc": { + "start": { + "line": 84, + "column": 44 + }, + "end": { + "line": 84, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 2009, + 2018 + ], + "loc": { + "start": { + "line": 84, + "column": 50 + }, + "end": { + "line": 84, + "column": 59 + } + } + }, + "range": [ + 1963, + 2018 + ], + "loc": { + "start": { + "line": 84, + "column": 4 + }, + "end": { + "line": 84, + "column": 59 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 2018, + 2022 + ], + "loc": { + "start": { + "line": 84, + "column": 59 + }, + "end": { + "line": 85, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 2022, + 2030 + ], + "loc": { + "start": { + "line": 85, + "column": 3 + }, + "end": { + "line": 85, + "column": 11 + } + } + }, + "range": [ + 1779, + 2030 + ], + "loc": { + "start": { + "line": 79, + "column": 3 + }, + "end": { + "line": 85, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 1724, + 2040 + ], + "loc": { + "start": { + "line": 78, + "column": 2 + }, + "end": { + "line": 86, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1766, + 1770 + ], + "loc": { + "start": { + "line": 78, + "column": 44 + }, + "end": { + "line": 78, + "column": 48 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1822, + 1826 + ], + "loc": { + "start": { + "line": 80, + "column": 23 + }, + "end": { + "line": 80, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1854, + 1858 + ], + "loc": { + "start": { + "line": 81, + "column": 21 + }, + "end": { + "line": 81, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1921, + 1925 + ], + "loc": { + "start": { + "line": 82, + "column": 55 + }, + "end": { + "line": 82, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1941, + 1945 + ], + "loc": { + "start": { + "line": 83, + "column": 5 + }, + "end": { + "line": 83, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1995, + 1999 + ], + "loc": { + "start": { + "line": 84, + "column": 36 + }, + "end": { + "line": 84, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1766, + 1770 + ], + "loc": { + "start": { + "line": 78, + "column": 44 + }, + "end": { + "line": 78, + "column": 48 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1822, + 1826 + ], + "loc": { + "start": { + "line": 80, + "column": 23 + }, + "end": { + "line": 80, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1806, + 1813 + ], + "loc": { + "start": { + "line": 80, + "column": 7 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1854, + 1858 + ], + "loc": { + "start": { + "line": 81, + "column": 21 + }, + "end": { + "line": 81, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1841, + 1845 + ], + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1941, + 1945 + ], + "loc": { + "start": { + "line": 83, + "column": 5 + }, + "end": { + "line": 83, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1916, + 1920 + ], + "loc": { + "start": { + "line": 82, + "column": 50 + }, + "end": { + "line": 82, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1921, + 1925 + ], + "loc": { + "start": { + "line": 82, + "column": 55 + }, + "end": { + "line": 82, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1916, + 1920 + ], + "loc": { + "start": { + "line": 82, + "column": 50 + }, + "end": { + "line": 82, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1921, + 1925 + ], + "loc": { + "start": { + "line": 82, + "column": 55 + }, + "end": { + "line": 82, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1988, + 1994 + ], + "loc": { + "start": { + "line": 84, + "column": 29 + }, + "end": { + "line": 84, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1995, + 1999 + ], + "loc": { + "start": { + "line": 84, + "column": 36 + }, + "end": { + "line": 84, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1988, + 1994 + ], + "loc": { + "start": { + "line": 84, + "column": 29 + }, + "end": { + "line": 84, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 1995, + 1999 + ], + "loc": { + "start": { + "line": 84, + "column": 36 + }, + "end": { + "line": 84, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 1760, + 1764 + ], + "loc": { + "start": { + "line": 78, + "column": 38 + }, + "end": { + "line": 78, + "column": 42 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "receive", + "range": [ + 1806, + 1813 + ], + "loc": { + "start": { + "line": 80, + "column": 7 + }, + "end": { + "line": 80, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "receive", + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "send", + "range": [ + 1841, + 1845 + ], + "loc": { + "start": { + "line": 81, + "column": 8 + }, + "end": { + "line": 81, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "send", + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "mark", + "range": [ + 1916, + 1920 + ], + "loc": { + "start": { + "line": 82, + "column": 50 + }, + "end": { + "line": 82, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "mark", + "range": [ + 1113, + 1117 + ], + "loc": { + "start": { + "line": 49, + "column": 10 + }, + "end": { + "line": 49, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remove", + "range": [ + 1988, + 1994 + ], + "loc": { + "start": { + "line": 84, + "column": 29 + }, + "end": { + "line": 84, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remove", + "range": [ + 1043, + 1049 + ], + "loc": { + "start": { + "line": 45, + "column": 10 + }, + "end": { + "line": 45, + "column": 16 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 155, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "getComputedStyle", + "range": [ + 220, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json new file mode 100644 index 00000000..95cc1601 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json @@ -0,0 +1,1176 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "time", + "identifiers": [ + { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$time", + "range": [ + 233, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "elapsed", + "identifiers": [ + { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "local": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$elapsed", + "range": [ + 282, + 290 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$elapsed", + "range": [ + 293, + 301 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$elapsed", + "range": [ + 293, + 301 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ] + }, + { + "name": "formatter", + "identifiers": [ + { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'en'", + "value": "en", + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "hour12", + "range": [ + 109, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 109, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "hour", + "range": [ + 125, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'numeric'", + "value": "numeric", + "range": [ + 131, + 140 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 125, + 140 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "minute", + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'2-digit'", + "value": "2-digit", + "range": [ + 152, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 144, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "second", + "range": [ + 165, + 171 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'2-digit'", + "value": "2-digit", + "range": [ + 173, + 182 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "range": [ + 165, + 182 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "range": [ + 105, + 185 + ], + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Intl", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "DateTimeFormat", + "range": [ + 84, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + "range": [ + 79, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + "range": [ + 75, + 186 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "range": [ + 63, + 186 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 216, + 225 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Intl", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 216, + 225 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 63, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$time", + "range": [ + 233, + 238 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$elapsed", + "range": [ + 282, + 290 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$elapsed", + "range": [ + 293, + 301 + ], + "loc": { + "start": { + "line": 16, + "column": 13 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elapsed", + "range": [ + 25, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Intl", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Intl", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json new file mode 100644 index 00000000..9694da1d --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json @@ -0,0 +1,1208 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "w", + "identifiers": [ + { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": null, + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "w", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "w", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "h", + "identifiers": [ + { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": null, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "h", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "h", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 19, + "column": 45 + }, + "end": { + "line": 19, + "column": 46 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + }, + { + "name": "size", + "identifiers": [ + { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 37, + 39 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "range": [ + 30, + 39 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 215, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 30 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'edit me'", + "value": "edit me", + "range": [ + 53, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 46, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 241, + 245 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 362, + 366 + ], + "loc": { + "start": { + "line": 20, + "column": 36 + }, + "end": { + "line": 20, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 215, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 30 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 241, + 245 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "w", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "h", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "w", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "w", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "h", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 19, + "column": 45 + }, + "end": { + "line": 19, + "column": 46 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "h", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 30, + 34 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 362, + 366 + ], + "loc": { + "start": { + "line": 20, + "column": 36 + }, + "end": { + "line": 20, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json new file mode 100644 index 00000000..9b6180d3 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json @@ -0,0 +1,570 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "CustomButton", + "identifiers": [ + { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 17, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 17, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 17, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "range": [ + 17, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 122, + 134 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 17, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'clicked'", + "value": "clicked", + "range": [ + 95, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 89, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 89, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "range": [ + 85, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [], + "range": [ + 62, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 145, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 145, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 71, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 122, + 134 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "CustomButton", + "range": [ + 17, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json new file mode 100644 index 00000000..d444e2c1 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json @@ -0,0 +1,1821 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "m", + "identifiers": [ + { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 20, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "range": [ + 18, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 14, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 245, + 246 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 15, + "column": 32 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "handleMousemove", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientY", + "range": [ + 107, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 101, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "range": [ + 68, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 36, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 203, + 218 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 203, + 218 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 245, + 246 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 15, + "column": 32 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientY", + "range": [ + 107, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 101, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "range": [ + 68, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 36, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json new file mode 100644 index 00000000..826fddf0 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json @@ -0,0 +1,458 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "src", + "identifiers": [ + { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "'tutorial/image.gif'", + "value": "tutorial/image.gif", + "range": [ + 20, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 14, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 85, + 88 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 117, + 120 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json new file mode 100644 index 00000000..b68a286f --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json @@ -0,0 +1,4152 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "todos", + "identifiers": [ + { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 28, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 34, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "range": [ + 28, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 41, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'finish Svelte tutorial'", + "value": "finish Svelte tutorial", + "range": [ + 47, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "range": [ + 41, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 47 + } + } + } + ], + "range": [ + 26, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 49 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "range": [ + 79, + 90 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 92, + 96 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'build an app'", + "value": "build an app", + "range": [ + 98, + 112 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + "range": [ + 92, + 112 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 37 + } + } + } + ], + "range": [ + 77, + 114 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 120, + 124 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "range": [ + 120, + 131 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 133, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'world domination'", + "value": "world domination", + "range": [ + 139, + 157 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "range": [ + 133, + 157 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 41 + } + } + } + ], + "range": [ + 118, + 159 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 43 + } + } + } + ], + "range": [ + 22, + 162 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "range": [ + 14, + 162 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 260, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 268, + 273 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 431, + 436 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "add", + "identifiers": [ + { + "type": "Identifier", + "name": "add", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "add", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 208, + 212 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 214, + 219 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "range": [ + 208, + 219 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 221, + 225 + ], + "loc": { + "start": { + "line": 9, + "column": 38 + }, + "end": { + "line": 9, + "column": 42 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 227, + 229 + ], + "loc": { + "start": { + "line": 9, + "column": 44 + }, + "end": { + "line": 9, + "column": 46 + } + } + }, + "range": [ + 221, + 229 + ], + "loc": { + "start": { + "line": 9, + "column": 38 + }, + "end": { + "line": 9, + "column": 46 + } + } + } + ], + "range": [ + 206, + 231 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 48 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 199, + 205 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "range": [ + 193, + 205 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 193, + 232 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 49 + } + } + }, + "range": [ + 185, + 232 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 49 + } + } + }, + "range": [ + 185, + 233 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 50 + } + } + } + ], + "range": [ + 181, + 236 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "params": [], + "range": [ + 166, + 236 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 679, + 682 + ], + "loc": { + "start": { + "line": 43, + "column": 18 + }, + "end": { + "line": 43, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ] + }, + { + "name": "clear", + "identifiers": [ + { + "type": "Identifier", + "name": "clear", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "clear", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 260, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 289, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "range": [ + 287, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 286, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "range": [ + 281, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 35 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 268, + 273 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 274, + 280 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "range": [ + 268, + 280 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 268, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 36 + } + } + }, + "range": [ + 260, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 36 + } + } + }, + "range": [ + 260, + 295 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 37 + } + } + } + ], + "range": [ + 256, + 298 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "clear", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "params": [], + "range": [ + 239, + 298 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "clear", + "range": [ + 723, + 728 + ], + "loc": { + "start": { + "line": 47, + "column": 18 + }, + "end": { + "line": 47, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "clear", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + } + } + ] + }, + { + "name": "remaining", + "identifiers": [ + { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 335, + 336 + ], + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 337, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + "range": [ + 335, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 334, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + } + ], + "range": [ + 329, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 41 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 322, + 328 + ], + "loc": { + "start": { + "line": 16, + "column": 22 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + "range": [ + 316, + 328 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 316, + 342 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 42 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 343, + 349 + ], + "loc": { + "start": { + "line": 16, + "column": 43 + }, + "end": { + "line": 16, + "column": 49 + } + } + }, + "range": [ + 316, + 349 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 49 + } + } + }, + "range": [ + 304, + 349 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 49 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "remaining", + "range": [ + 635, + 644 + ], + "loc": { + "start": { + "line": 41, + "column": 4 + }, + "end": { + "line": 41, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 316, + 321 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 431, + 436 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "remaining", + "range": [ + 635, + 644 + ], + "loc": { + "start": { + "line": 41, + "column": 4 + }, + "end": { + "line": 41, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "remaining", + "range": [ + 304, + 313 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [ + 679, + 682 + ], + "loc": { + "start": { + "line": 43, + "column": 18 + }, + "end": { + "line": 43, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "clear", + "range": [ + 723, + 728 + ], + "loc": { + "start": { + "line": 47, + "column": 18 + }, + "end": { + "line": 47, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "clear", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 193, + 198 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 260, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 268, + 273 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 289, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "range": [ + 287, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 286, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "range": [ + 281, + 293 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 260, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 268, + 273 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "t", + "range": [ + 335, + 336 + ], + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 36 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 337, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 37 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + "range": [ + 335, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 334, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 34 + }, + "end": { + "line": 16, + "column": 41 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + } + ], + "range": [ + 329, + 341 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 335, + 336 + ], + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 335, + 336 + ], + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 329, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "todos", + "range": [ + 431, + 436 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 448, + 451 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Class", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "done", + "range": [ + 458, + 462 + ], + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 452, + 462 + ], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 16 + } + } + }, + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 464, + 468 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 469, + 473 + ], + "loc": { + "start": { + "line": 28, + "column": 23 + }, + "end": { + "line": 28, + "column": 27 + } + } + }, + "range": [ + 464, + 473 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 27 + } + } + }, + "shorthand": false, + "range": [ + 452, + 474 + ], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 28 + } + } + } + ], + "selfClosing": false, + "range": [ + 447, + 475 + ], + "loc": { + "start": { + "line": 28, + "column": 1 + }, + "end": { + "line": 28, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 475, + 478 + ], + "loc": { + "start": { + "line": 28, + "column": 29 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 479, + 484 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "type", + "range": [ + 488, + 492 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 7 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "checkbox", + "range": [ + 493, + 501 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 16 + } + } + } + ], + "range": [ + 488, + 501 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Binding", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "checked", + "range": [ + 510, + 517 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 15 + } + } + }, + "modifiers": [], + "range": [ + 505, + 517 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 15 + } + } + }, + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 519, + 523 + ], + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 524, + 528 + ], + "loc": { + "start": { + "line": 31, + "column": 22 + }, + "end": { + "line": 31, + "column": 26 + } + } + }, + "range": [ + 519, + 528 + ], + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 26 + } + } + }, + "shorthand": false, + "range": [ + 505, + 529 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 27 + } + } + } + ], + "selfClosing": false, + "range": [ + 478, + 533 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 478, + 533 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n\t\t", + "range": [ + 533, + 537 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 34, + "column": 2 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 538, + 543 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "placeholder", + "range": [ + 547, + 558 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 14 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "What needs to be done?", + "range": [ + 560, + 582 + ], + "loc": { + "start": { + "line": 35, + "column": 16 + }, + "end": { + "line": 35, + "column": 38 + } + } + } + ], + "range": [ + 547, + 583 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 39 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Binding", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "value", + "range": [ + 592, + 597 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "modifiers": [], + "range": [ + 587, + 597 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 599, + 603 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 19 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 604, + 608 + ], + "loc": { + "start": { + "line": 36, + "column": 20 + }, + "end": { + "line": 36, + "column": 24 + } + } + }, + "range": [ + 599, + 608 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 24 + } + } + }, + "shorthand": false, + "range": [ + 587, + 609 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 25 + } + } + } + ], + "selfClosing": false, + "range": [ + 537, + 613 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 37, + "column": 3 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 537, + 613 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 37, + "column": 3 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 613, + 615 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 38, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 615, + 621 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 7 + } + } + }, + "range": [ + 447, + 621 + ], + "loc": { + "start": { + "line": 28, + "column": 1 + }, + "end": { + "line": 38, + "column": 7 + } + } + } + ], + "else": null, + "range": [ + 424, + 629 + ], + "loc": { + "start": { + "line": 27, + "column": 0 + }, + "end": { + "line": 39, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 464, + 468 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 519, + 523 + ], + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 599, + 603 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 464, + 468 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 519, + 523 + ], + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 599, + 603 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 440, + 444 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json new file mode 100644 index 00000000..2ff11068 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json @@ -0,0 +1,1422 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "cats", + "identifiers": [ + { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 27, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'J---aiyznGQ'", + "value": "J---aiyznGQ", + "range": [ + 31, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 27, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Keyboard Cat'", + "value": "Keyboard Cat", + "range": [ + 52, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 46, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + ], + "range": [ + 25, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'z_AbfPXTKms'", + "value": "z_AbfPXTKms", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 74, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 93, + 97 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Maru'", + "value": "Maru", + "range": [ + 99, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 93, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "range": [ + 72, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 113, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'OUtn3pvWmpg'", + "value": "OUtn3pvWmpg", + "range": [ + 117, + 130 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 113, + 130 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Henri The Existential Cat'", + "value": "Henri The Existential Cat", + "range": [ + 138, + 165 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 56 + } + } + }, + "range": [ + 132, + 165 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 56 + } + } + } + ], + "range": [ + 111, + 167 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 58 + } + } + } + ], + "range": [ + 21, + 170 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "range": [ + 14, + 170 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "cat", + "identifiers": [ + { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 249, + 251 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 248, + 252 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "a", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "target", + "range": [ + 255, + 261 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "_blank", + "range": [ + 263, + 269 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "range": [ + 255, + 270 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "href", + "range": [ + 271, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "https://www.youtube.com/watch?v=", + "range": [ + 277, + 309 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "cat", + "range": [ + 310, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 314, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 68 + }, + "end": { + "line": 13, + "column": 70 + } + } + }, + "range": [ + 310, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 70 + } + } + }, + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 13, + "column": 63 + }, + "end": { + "line": 13, + "column": 71 + } + } + } + ], + "range": [ + 271, + 318 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 72 + } + } + } + ], + "selfClosing": false, + "range": [ + 252, + 319 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 73 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 319, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 73 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "cat", + "range": [ + 324, + 327 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 328, + 332 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "range": [ + 324, + 332 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "range": [ + 323, + 333 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 333, + 336 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 336, + 340 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "range": [ + 252, + 340 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 15, + "column": 6 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 340, + 345 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "range": [ + 248, + 345 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 15, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 226, + 354 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 16, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 310, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 324, + 327 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 310, + 313 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 324, + 327 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json new file mode 100644 index 00000000..31e48a68 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json @@ -0,0 +1,2267 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "cats", + "identifiers": [ + { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 27, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'J---aiyznGQ'", + "value": "J---aiyznGQ", + "range": [ + 31, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 27, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Keyboard Cat'", + "value": "Keyboard Cat", + "range": [ + 52, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "range": [ + 46, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 43 + } + } + } + ], + "range": [ + 25, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 45 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 74, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'z_AbfPXTKms'", + "value": "z_AbfPXTKms", + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 74, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 93, + 97 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Maru'", + "value": "Maru", + "range": [ + 99, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 93, + 105 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "range": [ + 72, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 113, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'OUtn3pvWmpg'", + "value": "OUtn3pvWmpg", + "range": [ + 117, + 130 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 113, + 130 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Henri The Existential Cat'", + "value": "Henri The Existential Cat", + "range": [ + 138, + 165 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 56 + } + } + }, + "range": [ + 132, + 165 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 56 + } + } + } + ], + "range": [ + 111, + 167 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 58 + } + } + } + ], + "range": [ + 21, + 170 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "range": [ + 14, + 170 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cats", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "cat", + "identifiers": [ + { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 252, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "a", + "range": [ + 256, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "target", + "range": [ + 258, + 264 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "_blank", + "range": [ + 266, + 272 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "range": [ + 258, + 273 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "href", + "range": [ + 274, + 278 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "https://www.youtube.com/watch?v=", + "range": [ + 280, + 312 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "cat", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 317, + 319 + ], + "loc": { + "start": { + "line": 13, + "column": 68 + }, + "end": { + "line": 13, + "column": 70 + } + } + }, + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 70 + } + } + }, + "range": [ + 312, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 63 + }, + "end": { + "line": 13, + "column": 71 + } + } + } + ], + "range": [ + 274, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 72 + } + } + } + ], + "selfClosing": false, + "range": [ + 255, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 73 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 322, + 326 + ], + "loc": { + "start": { + "line": 13, + "column": 73 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 327, + 332 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 326, + 333 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 333, + 335 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "cat", + "range": [ + 336, + 339 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 340, + 344 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "range": [ + 336, + 344 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "range": [ + 335, + 345 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 22 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 345, + 348 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 348, + 352 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "range": [ + 255, + 352 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 15, + "column": 6 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 352, + 357 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "range": [ + 251, + 357 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 15, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 226, + 366 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 16, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 336, + 339 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "cats", + "range": [ + 233, + 237 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "index": { + "type": "Identifier", + "name": "i", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 252, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 251, + 255 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "a", + "range": [ + 256, + 257 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "target", + "range": [ + 258, + 264 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "_blank", + "range": [ + 266, + 272 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 23 + } + } + } + ], + "range": [ + 258, + 273 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "href", + "range": [ + 274, + 278 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "https://www.youtube.com/watch?v=", + "range": [ + 280, + 312 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 63 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "cat", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 317, + 319 + ], + "loc": { + "start": { + "line": 13, + "column": 68 + }, + "end": { + "line": 13, + "column": 70 + } + } + }, + "range": [ + 313, + 319 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 70 + } + } + }, + "range": [ + 312, + 320 + ], + "loc": { + "start": { + "line": 13, + "column": 63 + }, + "end": { + "line": 13, + "column": 71 + } + } + } + ], + "range": [ + 274, + 321 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 72 + } + } + } + ], + "selfClosing": false, + "range": [ + 255, + 322 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 73 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 322, + 326 + ], + "loc": { + "start": { + "line": 13, + "column": 73 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "i", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 331, + 332 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 327, + 332 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 326, + 333 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": ": ", + "range": [ + 333, + 335 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "cat", + "range": [ + 336, + 339 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "name", + "range": [ + 340, + 344 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "range": [ + 336, + 344 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "range": [ + 335, + 345 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 22 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 345, + 348 + ], + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 15, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 348, + 352 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + "range": [ + 255, + 352 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 15, + "column": 6 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 352, + 357 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "range": [ + 251, + 357 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 15, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 226, + 366 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 16, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 64 + }, + "end": { + "line": 13, + "column": 67 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cat", + "range": [ + 336, + 339 + ], + "loc": { + "start": { + "line": 14, + "column": 13 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cat", + "range": [ + 241, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json new file mode 100644 index 00000000..103d301c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json @@ -0,0 +1,1141 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "user", + "identifiers": [ + { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "loggedIn", + "range": [ + 23, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 23, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "range": [ + 21, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 14, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "toggle", + "identifiers": [ + { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "loggedIn", + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "range": [ + 66, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "loggedIn", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "range": [ + 83, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 82, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "range": [ + 66, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "range": [ + 66, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 33 + } + } + } + ], + "range": [ + 62, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "params": [], + "range": [ + 44, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 208, + 214 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 208, + 214 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 208, + 214 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json new file mode 100644 index 00000000..0750fe26 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json @@ -0,0 +1,896 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "7", + "value": 7, + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json new file mode 100644 index 00000000..b6d37d55 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json @@ -0,0 +1,766 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "x", + "identifiers": [ + { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "7", + "value": 7, + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "x", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "x", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json new file mode 100644 index 00000000..3148c422 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json @@ -0,0 +1,1014 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Outer", + "identifiers": [ + { + "type": "Identifier", + "name": "Outer", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Outer", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Outer", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Outer", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Outer", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handleMessage", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "range": [ + 88, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 88, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 82, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 82, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 78, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "range": [ + 48, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 141, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 141, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Outer", + "range": [ + 123, + 128 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Outer", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "range": [ + 88, + 100 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 101, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 88, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 82, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 82, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 78, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMessage", + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + ], + "range": [ + 48, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json new file mode 100644 index 00000000..802d02d1 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json @@ -0,0 +1,891 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createEventDispatcher", + "identifiers": [ + { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "local": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "name": "dispatch", + "identifiers": [ + { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "optional": false, + "range": [ + 77, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "range": [ + 66, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + }, + { + "name": "sayHello", + "identifiers": [ + { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'message'", + "value": "message", + "range": [ + 137, + 146 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 153, + 157 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Hello!'", + "value": "Hello!", + "range": [ + 159, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + "range": [ + 153, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 17 + } + } + } + ], + "range": [ + 148, + 171 + ], + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 128, + 172 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "range": [ + 128, + 173 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 9, + "column": 5 + } + } + } + ], + "range": [ + 124, + 176 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "params": [], + "range": [ + 104, + 176 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 77, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 19, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 206, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sayHello", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 66, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json new file mode 100644 index 00000000..d2b520ce --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json @@ -0,0 +1,1385 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Inner", + "identifiers": [ + { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 219, + 224 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "createEventDispatcher", + "identifiers": [ + { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "local": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + }, + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 114, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + } + ] + }, + { + "name": "dispatch", + "identifiers": [ + { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 114, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "optional": false, + "range": [ + 114, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "range": [ + 103, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 41 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 169, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "name": "forward", + "identifiers": [ + { + "type": "Identifier", + "name": "forward", + "range": [ + 150, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "forward", + "range": [ + 150, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'message'", + "value": "message", + "range": [ + 178, + 187 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 195, + 201 + ], + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "range": [ + 189, + 201 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 169, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 169, + 202 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "range": [ + 169, + 203 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 36 + } + } + } + ], + "range": [ + 165, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "forward", + "range": [ + 150, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "range": [ + 141, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "forward", + "range": [ + 237, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "forward", + "range": [ + 150, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 114, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createEventDispatcher", + "range": [ + 56, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "forward", + "range": [ + 237, + 244 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "forward", + "range": [ + 150, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 219, + 224 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'message'", + "value": "message", + "range": [ + 178, + 187 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "detail", + "range": [ + 195, + 201 + ], + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "range": [ + 189, + 201 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 169, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "optional": false, + "range": [ + 169, + 202 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + "range": [ + 169, + 203 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 36 + } + } + } + ], + "range": [ + 165, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "forward", + "range": [ + 150, + 157 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + ], + "range": [ + 141, + 206 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 169, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 189, + 194 + ], + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 169, + 177 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "dispatch", + "range": [ + 103, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json new file mode 100644 index 00000000..247f30d0 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Inner", + "identifiers": [ + { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Inner", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Inner", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json new file mode 100644 index 00000000..0c32ef75 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json @@ -0,0 +1,407 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 19, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 19, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'no more alerts'", + "value": "no more alerts", + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 24 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 37, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 37, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 25 + } + } + } + ], + "range": [ + 33, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 19, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "params": [], + "range": [ + 10, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 19, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 98, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 23 + }, + "end": { + "line": 7, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 19, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 37, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json new file mode 100644 index 00000000..7e087144 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json @@ -0,0 +1,4456 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "scoops", + "identifiers": [ + { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 14, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 374, + 380 + ], + "loc": { + "start": { + "line": 19, + "column": 31 + }, + "end": { + "line": 19, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 453, + 459 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 533, + 539 + ], + "loc": { + "start": { + "line": 29, + "column": 31 + }, + "end": { + "line": 29, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 44, + "column": 28 + }, + "end": { + "line": 44, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 903, + 909 + ], + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 912, + 918 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "flavours", + "identifiers": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'Mint choc chip'", + "value": "Mint choc chip", + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + ], + "range": [ + 42, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 31, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 37, + "column": 35 + }, + "end": { + "line": 37, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 726, + 734 + ], + "loc": { + "start": { + "line": 42, + "column": 5 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 802, + 810 + ], + "loc": { + "start": { + "line": 44, + "column": 10 + }, + "end": { + "line": 44, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 958, + 966 + ], + "loc": { + "start": { + "line": 49, + "column": 11 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + }, + { + "name": "join", + "identifiers": [ + { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 126, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 45 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "range": [ + 126, + 137 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 47 + } + } + }, + "range": [ + 119, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 105, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 96, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "range": [ + 96, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "range": [ + 92, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "', '", + "value": ", ", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 43 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 32 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 169, + 171 + ], + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 151, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 151, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 151, + 172 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "join", + "range": [ + 173, + 177 + ], + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "range": [ + 151, + 177 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "optional": false, + "range": [ + 151, + 183 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 191, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 200, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 69 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 209, + 215 + ], + "loc": { + "start": { + "line": 7, + "column": 70 + }, + "end": { + "line": 7, + "column": 76 + } + } + }, + "range": [ + 200, + 215 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 76 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 7, + "column": 79 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 200, + 219 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 191, + 220 + ], + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 81 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 148, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " and ", + "raw": " and " + }, + "range": [ + 183, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 44 + }, + "end": { + "line": 7, + "column": 52 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 220, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 81 + }, + "end": { + "line": 7, + "column": 83 + } + } + } + ], + "range": [ + 148, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 83 + } + } + }, + "range": [ + 141, + 223 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 84 + } + } + } + ], + "range": [ + 88, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 64, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "join", + "range": [ + 953, + 957 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + } + } + ] + }, + { + "name": "menu", + "identifiers": [ + { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'Cookies and cream'", + "value": "Cookies and cream", + "range": [ + 243, + 262 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "Literal", + "raw": "'Mint choc chip'", + "value": "Mint choc chip", + "range": [ + 266, + 282 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "Literal", + "raw": "'Raspberry ripple'", + "value": "Raspberry ripple", + "range": [ + 286, + 304 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 20 + } + } + } + ], + "range": [ + 239, + 307 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "range": [ + 232, + 307 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 602, + 606 + ], + "loc": { + "start": { + "line": 35, + "column": 7 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 374, + 380 + ], + "loc": { + "start": { + "line": 19, + "column": 31 + }, + "end": { + "line": 19, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 453, + 459 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 533, + 539 + ], + "loc": { + "start": { + "line": 29, + "column": 31 + }, + "end": { + "line": 29, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 602, + 606 + ], + "loc": { + "start": { + "line": 35, + "column": 7 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 232, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 726, + 734 + ], + "loc": { + "start": { + "line": 42, + "column": 5 + }, + "end": { + "line": 42, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 802, + 810 + ], + "loc": { + "start": { + "line": 44, + "column": 10 + }, + "end": { + "line": 44, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 44, + "column": 28 + }, + "end": { + "line": 44, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "flavours", + "identifiers": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 126, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 45 + }, + "end": { + "line": 6, + "column": 46 + } + } + }, + "range": [ + 126, + 137 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 47 + } + } + }, + "range": [ + 119, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 105, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 96, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "range": [ + 96, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + "range": [ + 92, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "', '", + "value": ", ", + "range": [ + 178, + 182 + ], + "loc": { + "start": { + "line": 7, + "column": 39 + }, + "end": { + "line": 7, + "column": 43 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 32 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 169, + 171 + ], + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 7, + "column": 32 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 151, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "range": [ + 151, + 165 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 151, + 172 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "join", + "range": [ + 173, + 177 + ], + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "range": [ + 151, + 177 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 38 + } + } + }, + "optional": false, + "range": [ + 151, + 183 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 191, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 200, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 69 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 209, + 215 + ], + "loc": { + "start": { + "line": 7, + "column": 70 + }, + "end": { + "line": 7, + "column": 76 + } + } + }, + "range": [ + 200, + 215 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 76 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 7, + "column": 79 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 200, + 219 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 80 + } + } + }, + "range": [ + 191, + 220 + ], + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 81 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 148, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " and ", + "raw": " and " + }, + "range": [ + 183, + 191 + ], + "loc": { + "start": { + "line": 7, + "column": 44 + }, + "end": { + "line": 7, + "column": 52 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 220, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 81 + }, + "end": { + "line": 7, + "column": 83 + } + } + } + ], + "range": [ + 148, + 222 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 83 + } + } + }, + "range": [ + 141, + 223 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 84 + } + } + } + ], + "range": [ + 88, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "range": [ + 64, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 126, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 151, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 191, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 200, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 69 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 126, + 134 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 151, + 159 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 191, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 52 + }, + "end": { + "line": 7, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 200, + 208 + ], + "loc": { + "start": { + "line": 7, + "column": 61 + }, + "end": { + "line": 7, + "column": 69 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 78, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "flavour", + "identifiers": [ + { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "menu", + "range": [ + 602, + 606 + ], + "loc": { + "start": { + "line": 35, + "column": 7 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "context": { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "label", + "range": [ + 621, + 626 + ], + "loc": { + "start": { + "line": 36, + "column": 2 + }, + "end": { + "line": 36, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 620, + 627 + ], + "loc": { + "start": { + "line": 36, + "column": 1 + }, + "end": { + "line": 36, + "column": 8 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 627, + 630 + ], + "loc": { + "start": { + "line": 36, + "column": 8 + }, + "end": { + "line": 37, + "column": 2 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 631, + 636 + ], + "loc": { + "start": { + "line": 37, + "column": 3 + }, + "end": { + "line": 37, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "type", + "range": [ + 637, + 641 + ], + "loc": { + "start": { + "line": 37, + "column": 9 + }, + "end": { + "line": 37, + "column": 13 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "checkbox", + "range": [ + 642, + 650 + ], + "loc": { + "start": { + "line": 37, + "column": 14 + }, + "end": { + "line": 37, + "column": 22 + } + } + } + ], + "range": [ + 637, + 650 + ], + "loc": { + "start": { + "line": 37, + "column": 9 + }, + "end": { + "line": 37, + "column": 22 + } + } + }, + { + "type": "SvelteDirective", + "kind": "Binding", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "group", + "range": [ + 656, + 661 + ], + "loc": { + "start": { + "line": 37, + "column": 28 + }, + "end": { + "line": 37, + "column": 33 + } + } + }, + "modifiers": [], + "range": [ + 651, + 661 + ], + "loc": { + "start": { + "line": 37, + "column": 23 + }, + "end": { + "line": 37, + "column": 33 + } + } + }, + "expression": { + "type": "Identifier", + "name": "flavours", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 37, + "column": 35 + }, + "end": { + "line": 37, + "column": 43 + } + } + }, + "shorthand": false, + "range": [ + 651, + 672 + ], + "loc": { + "start": { + "line": 37, + "column": 23 + }, + "end": { + "line": 37, + "column": 44 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "value", + "range": [ + 673, + 678 + ], + "loc": { + "start": { + "line": 37, + "column": 45 + }, + "end": { + "line": 37, + "column": 50 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "flavour", + "range": [ + 680, + 687 + ], + "loc": { + "start": { + "line": 37, + "column": 52 + }, + "end": { + "line": 37, + "column": 59 + } + } + }, + "range": [ + 679, + 688 + ], + "loc": { + "start": { + "line": 37, + "column": 51 + }, + "end": { + "line": 37, + "column": 60 + } + } + } + ], + "range": [ + 673, + 688 + ], + "loc": { + "start": { + "line": 37, + "column": 45 + }, + "end": { + "line": 37, + "column": 60 + } + } + } + ], + "selfClosing": false, + "range": [ + 630, + 689 + ], + "loc": { + "start": { + "line": 37, + "column": 2 + }, + "end": { + "line": 37, + "column": 61 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 630, + 689 + ], + "loc": { + "start": { + "line": 37, + "column": 2 + }, + "end": { + "line": 37, + "column": 61 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 689, + 692 + ], + "loc": { + "start": { + "line": 37, + "column": 61 + }, + "end": { + "line": 38, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "flavour", + "range": [ + 693, + 700 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "range": [ + 692, + 701 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 11 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 701, + 703 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 39, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 703, + 711 + ], + "loc": { + "start": { + "line": 39, + "column": 1 + }, + "end": { + "line": 39, + "column": 9 + } + } + }, + "range": [ + 620, + 711 + ], + "loc": { + "start": { + "line": 36, + "column": 1 + }, + "end": { + "line": 39, + "column": 9 + } + } + } + ], + "else": null, + "range": [ + 595, + 719 + ], + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 40, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 680, + 687 + ], + "loc": { + "start": { + "line": 37, + "column": 52 + }, + "end": { + "line": 37, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 693, + 700 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 37, + "column": 35 + }, + "end": { + "line": 37, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 680, + 687 + ], + "loc": { + "start": { + "line": 37, + "column": 52 + }, + "end": { + "line": 37, + "column": 59 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 693, + 700 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 610, + 617 + ], + "loc": { + "start": { + "line": 35, + "column": 15 + }, + "end": { + "line": 35, + "column": 22 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 37, + "column": 35 + }, + "end": { + "line": 37, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 903, + 909 + ], + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 912, + 918 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "join", + "range": [ + 953, + 957 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 958, + 966 + ], + "loc": { + "start": { + "line": 49, + "column": 11 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 903, + 909 + ], + "loc": { + "start": { + "line": 48, + "column": 15 + }, + "end": { + "line": 48, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 912, + 918 + ], + "loc": { + "start": { + "line": 48, + "column": 24 + }, + "end": { + "line": 48, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "join", + "range": [ + 953, + 957 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "join", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 958, + 966 + ], + "loc": { + "start": { + "line": 49, + "column": 11 + }, + "end": { + "line": 49, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json new file mode 100644 index 00000000..50465ea7 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json @@ -0,0 +1,321 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "string", + "identifiers": [ + { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "this string contains some HTML!!!", + "raw": "this string contains some HTML!!!" + }, + "range": [ + 23, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 66 + } + } + } + ], + "range": [ + 23, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 66 + } + } + }, + "range": [ + 14, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 66 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 92, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 92, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json new file mode 100644 index 00000000..9352f3d3 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json @@ -0,0 +1,321 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "string", + "identifiers": [ + { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "this string contains some HTML!!!", + "raw": "this string contains some HTML!!!" + }, + "range": [ + 23, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 66 + } + } + } + ], + "range": [ + 23, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 66 + } + } + }, + "range": [ + 14, + 75 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 66 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "string", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "string", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json new file mode 100644 index 00000000..60ed4d1c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json @@ -0,0 +1,1221 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "user", + "identifiers": [ + { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "loggedIn", + "range": [ + 23, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 33, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 23, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "range": [ + 21, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 14, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 194, + 198 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "name": "toggle", + "identifiers": [ + { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "loggedIn", + "range": [ + 71, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "range": [ + 66, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "loggedIn", + "range": [ + 88, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "range": [ + 83, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 82, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "range": [ + 66, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + "range": [ + 66, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 33 + } + } + } + ], + "range": [ + 62, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "params": [], + "range": [ + 44, + 100 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 117, + 121 + ], + "loc": { + "start": { + "line": 9, + "column": 5 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 194, + 198 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 66, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "user", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "user", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 151, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 53, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json new file mode 100644 index 00000000..36b838c1 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json @@ -0,0 +1,830 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "fade", + "identifiers": [ + { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 224, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 46 + }, + "end": { + "line": 12, + "column": 50 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "fly", + "identifiers": [ + { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "local": { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 72, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 62, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 135, + 142 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 169, + 176 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 135, + 142 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 169, + 176 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 62, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 224, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 46 + }, + "end": { + "line": 12, + "column": 50 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 185, + 188 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 25, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 224, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 46 + }, + "end": { + "line": 12, + "column": 50 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json new file mode 100644 index 00000000..7b083aec --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json @@ -0,0 +1,2362 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "m", + "identifiers": [ + { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 20, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "range": [ + 18, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 14, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 279, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 32 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "handleMousemove", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientY", + "range": [ + 107, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 101, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "range": [ + 68, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 36, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 279, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 32 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "x", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 78, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 72, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "y", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientY", + "range": [ + 107, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 101, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 95, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 22 + } + } + } + ], + "range": [ + 68, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 45, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + ], + "range": [ + 36, + 118 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 61, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 31 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "m", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "operator": "=", + "right": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 14, + "column": 31 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 34 + }, + "end": { + "line": 14, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 220, + 227 + ], + "loc": { + "start": { + "line": 14, + "column": 36 + }, + "end": { + "line": 14, + "column": 43 + } + } + }, + "range": [ + 218, + 227 + ], + "loc": { + "start": { + "line": 14, + "column": 34 + }, + "end": { + "line": 14, + "column": 43 + } + } + }, + "range": [ + 215, + 227 + ], + "loc": { + "start": { + "line": 14, + "column": 31 + }, + "end": { + "line": 14, + "column": 43 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 45 + }, + "end": { + "line": 14, + "column": 46 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 14, + "column": 48 + }, + "end": { + "line": 14, + "column": 49 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientY", + "range": [ + 234, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 50 + }, + "end": { + "line": 14, + "column": 57 + } + } + }, + "range": [ + 232, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 48 + }, + "end": { + "line": 14, + "column": 57 + } + } + }, + "range": [ + 229, + 241 + ], + "loc": { + "start": { + "line": 14, + "column": 45 + }, + "end": { + "line": 14, + "column": 57 + } + } + } + ], + "range": [ + 213, + 243 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 59 + } + } + }, + "range": [ + 209, + 243 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 59 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + ], + "range": [ + 204, + 243 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 59 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 34 + }, + "end": { + "line": 14, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 14, + "column": 48 + }, + "end": { + "line": 14, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 14, + "column": 34 + }, + "end": { + "line": 14, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 14, + "column": 48 + }, + "end": { + "line": 14, + "column": 49 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "m", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "m", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json new file mode 100644 index 00000000..29606a3d --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json @@ -0,0 +1,2265 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Thing", + "identifiers": [ + { + "type": "Identifier", + "name": "Thing", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Thing", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Thing", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Thing", + "range": [ + 387, + 392 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Thing", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "things", + "identifiers": [ + { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 71, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "range": [ + 67, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'darkblue'", + "value": "darkblue", + "range": [ + 81, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 28 + } + } + }, + "range": [ + 74, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 28 + } + } + } + ], + "range": [ + 65, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 99, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "range": [ + 99, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 106, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'indigo'", + "value": "indigo", + "range": [ + 113, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 106, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 97, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 129, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "range": [ + 129, + 134 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 136, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'deeppink'", + "value": "deeppink", + "range": [ + 143, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "range": [ + 136, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 28 + } + } + } + ], + "range": [ + 127, + 155 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 161, + 163 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 161, + 166 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 168, + 173 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'salmon'", + "value": "salmon", + "range": [ + 175, + 183 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 26 + } + } + }, + "range": [ + 168, + 183 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 26 + } + } + } + ], + "range": [ + 159, + 185 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 28 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 191, + 193 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "5", + "value": 5, + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "range": [ + 191, + 196 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 198, + 203 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'gold'", + "value": "gold", + "range": [ + 205, + 211 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "range": [ + 198, + 211 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 24 + } + } + } + ], + "range": [ + 189, + 213 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 26 + } + } + } + ], + "range": [ + 61, + 216 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "range": [ + 52, + 216 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 247, + 253 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 229, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 229, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "things", + "range": [ + 247, + 253 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "things", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 263, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "range": [ + 256, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 256, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "range": [ + 247, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "range": [ + 247, + 272 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 27 + } + } + } + ], + "range": [ + 243, + 275 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 229, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "params": [], + "range": [ + 220, + 275 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 305, + 316 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 229, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 305, + 316 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 229, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 247, + 253 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 247, + 253 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "things", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "things", + "range": [ + 52, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "thing", + "identifiers": [ + { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "things", + "range": [ + 357, + 363 + ], + "loc": { + "start": { + "line": 21, + "column": 7 + }, + "end": { + "line": 21, + "column": 13 + } + } + }, + "context": { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "index": null, + "key": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "thing", + "range": [ + 374, + 379 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 380, + 382 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "range": [ + 374, + 382 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Thing", + "range": [ + 387, + 392 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "current", + "range": [ + 393, + 400 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "thing", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 22, + "column": 17 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "color", + "range": [ + 408, + 413 + ], + "loc": { + "start": { + "line": 22, + "column": 23 + }, + "end": { + "line": 22, + "column": 28 + } + } + }, + "range": [ + 402, + 413 + ], + "loc": { + "start": { + "line": 22, + "column": 17 + }, + "end": { + "line": 22, + "column": 28 + } + } + }, + "range": [ + 401, + 414 + ], + "loc": { + "start": { + "line": 22, + "column": 16 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + ], + "range": [ + 393, + 414 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + ], + "selfClosing": true, + "range": [ + 386, + 416 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 31 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 386, + 416 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 31 + } + } + } + ], + "else": null, + "range": [ + 350, + 424 + ], + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "thing", + "range": [ + 374, + 379 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "thing", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 22, + "column": 17 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "thing", + "range": [ + 374, + 379 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "thing", + "range": [ + 402, + 407 + ], + "loc": { + "start": { + "line": 22, + "column": 17 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "thing", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 17 + }, + "end": { + "line": 21, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Thing", + "range": [ + 387, + 392 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Thing", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Thing", + "range": [ + 387, + 392 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Thing", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json new file mode 100644 index 00000000..af378fb0 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json @@ -0,0 +1,2020 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "slide", + "identifiers": [ + { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "slide", + "range": [ + 483, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "showItems", + "identifiers": [ + { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "range": [ + 59, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showItems", + "range": [ + 318, + 327 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 17, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showItems", + "range": [ + 419, + 428 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + } + ] + }, + { + "name": "i", + "identifiers": [ + { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "5", + "value": 5, + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 392, + 393 + ], + "loc": { + "start": { + "line": 22, + "column": 33 + }, + "end": { + "line": 22, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ] + }, + { + "name": "items", + "identifiers": [ + { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'one'", + "value": "one", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Literal", + "raw": "'two'", + "value": "two", + "range": [ + 110, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Literal", + "raw": "'three'", + "value": "three", + "range": [ + 117, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "Literal", + "raw": "'four'", + "value": "four", + "range": [ + 126, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 43 + } + } + }, + { + "type": "Literal", + "raw": "'five'", + "value": "five", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 6, + "column": 45 + }, + "end": { + "line": 6, + "column": 51 + } + } + }, + { + "type": "Literal", + "raw": "'six'", + "value": "six", + "range": [ + 142, + 147 + ], + "loc": { + "start": { + "line": 6, + "column": 53 + }, + "end": { + "line": 6, + "column": 58 + } + } + }, + { + "type": "Literal", + "raw": "'seven'", + "value": "seven", + "range": [ + 149, + 156 + ], + "loc": { + "start": { + "line": 6, + "column": 60 + }, + "end": { + "line": 6, + "column": 67 + } + } + }, + { + "type": "Literal", + "raw": "'eight'", + "value": "eight", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 6, + "column": 69 + }, + "end": { + "line": 6, + "column": 76 + } + } + }, + { + "type": "Literal", + "raw": "'nine'", + "value": "nine", + "range": [ + 167, + 173 + ], + "loc": { + "start": { + "line": 6, + "column": 78 + }, + "end": { + "line": 6, + "column": 84 + } + } + }, + { + "type": "Literal", + "raw": "'ten'", + "value": "ten", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 6, + "column": 86 + }, + "end": { + "line": 6, + "column": 91 + } + } + } + ], + "range": [ + 102, + 181 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 92 + } + } + }, + "range": [ + 94, + 181 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 92 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showItems", + "range": [ + 318, + 327 + ], + "loc": { + "start": { + "line": 17, + "column": 38 + }, + "end": { + "line": 17, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 392, + 393 + ], + "loc": { + "start": { + "line": 22, + "column": 33 + }, + "end": { + "line": 22, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showItems", + "range": [ + 419, + 428 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showItems", + "range": [ + 59, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "item", + "identifiers": [ + { + "type": "Identifier", + "name": "item", + "range": [ + 459, + 463 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "item", + "range": [ + 459, + 463 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 33 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 450, + 451 + ], + "loc": { + "start": { + "line": 27, + "column": 20 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + { + "type": "Identifier", + "name": "i", + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "items", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 444, + 449 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 19 + } + } + }, + "range": [ + 438, + 449 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 438, + 455 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 25 + } + } + }, + "context": { + "type": "Identifier", + "name": "item", + "range": [ + 459, + 463 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 33 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 468, + 471 + ], + "loc": { + "start": { + "line": 28, + "column": 3 + }, + "end": { + "line": 28, + "column": 6 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Transition", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "Identifier", + "name": "slide", + "range": [ + 483, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 23 + } + } + }, + "modifiers": [ + "local" + ], + "range": [ + 472, + 494 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 29 + } + } + }, + "intro": true, + "outro": true, + "expression": null, + "range": [ + 472, + 494 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 29 + } + } + } + ], + "selfClosing": false, + "range": [ + 467, + 495 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 30 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 495, + 499 + ], + "loc": { + "start": { + "line": 28, + "column": 30 + }, + "end": { + "line": 29, + "column": 3 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "item", + "range": [ + 500, + 504 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "range": [ + 499, + 505 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 29, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 505, + 508 + ], + "loc": { + "start": { + "line": 29, + "column": 9 + }, + "end": { + "line": 30, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 508, + 514 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 8 + } + } + }, + "range": [ + 467, + 514 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 30, + "column": 8 + } + } + } + ], + "else": null, + "range": [ + 431, + 523 + ], + "loc": { + "start": { + "line": 27, + "column": 1 + }, + "end": { + "line": 31, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 500, + 504 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 459, + 463 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 33 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "slide", + "range": [ + 483, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "item", + "range": [ + 500, + 504 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "item", + "range": [ + 459, + 463 + ], + "loc": { + "start": { + "line": 27, + "column": 29 + }, + "end": { + "line": 27, + "column": 33 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "slide", + "range": [ + 483, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "items", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "items", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "i", + "range": [ + 453, + 454 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 24 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "i", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "slide", + "range": [ + 483, + 488 + ], + "loc": { + "start": { + "line": 28, + "column": 18 + }, + "end": { + "line": 28, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "slide", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json new file mode 100644 index 00000000..90b0c54a --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json @@ -0,0 +1,13446 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "time", + "identifiers": [ + { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 68, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 2368, + 2372 + ], + "loc": { + "start": { + "line": 116, + "column": 20 + }, + "end": { + "line": 116, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 2539, + 2543 + ], + "loc": { + "start": { + "line": 123, + "column": 21 + }, + "end": { + "line": 123, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 2617, + 2621 + ], + "loc": { + "start": { + "line": 126, + "column": 30 + }, + "end": { + "line": 126, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + }, + { + "name": "duration", + "identifiers": [ + { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "init": null, + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 468, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 576, + 584 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2381, + 2389 + ], + "loc": { + "start": { + "line": 117, + "column": 7 + }, + "end": { + "line": 117, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2482, + 2490 + ], + "loc": { + "start": { + "line": 122, + "column": 40 + }, + "end": { + "line": 122, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2546, + 2554 + ], + "loc": { + "start": { + "line": 123, + "column": 28 + }, + "end": { + "line": 123, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2738, + 2746 + ], + "loc": { + "start": { + "line": 128, + "column": 30 + }, + "end": { + "line": 128, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + }, + { + "name": "paused", + "identifiers": [ + { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 107, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 98, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 2397, + 2403 + ], + "loc": { + "start": { + "line": 118, + "column": 7 + }, + "end": { + "line": 118, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 2659, + 2665 + ], + "loc": { + "start": { + "line": 127, + "column": 28 + }, + "end": { + "line": 127, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + }, + { + "name": "showControls", + "identifiers": [ + { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 134, + 138 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 24 + } + } + }, + "range": [ + 119, + 138 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 389, + 401 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 2494, + 2506 + ], + "loc": { + "start": { + "line": 122, + "column": 52 + }, + "end": { + "line": 122, + "column": 64 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ] + }, + { + "name": "showControlsTimeout", + "identifiers": [ + { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "init": null, + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 319, + 338 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + } + ] + }, + { + "name": "handleMousemove", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 177, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 177, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "clearTimeout", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 282, + 315 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "range": [ + 282, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 36 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 319, + 338 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "showControls", + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 373, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 56 + }, + "end": { + "line": 14, + "column": 61 + } + } + }, + "range": [ + 358, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 61 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 352, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 61 + } + } + }, + { + "type": "Literal", + "raw": "2500", + "value": 2500, + "range": [ + 380, + 384 + ], + "loc": { + "start": { + "line": 14, + "column": 63 + }, + "end": { + "line": 14, + "column": 67 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 341, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 68 + } + } + }, + "range": [ + 319, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 68 + } + } + }, + "range": [ + 319, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 69 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "showControls", + "range": [ + 389, + 401 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 389, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 389, + 409 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 435, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "buttons", + "range": [ + 421, + 428 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "range": [ + 419, + 428 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "operator": "&", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 431, + 432 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 419, + 432 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 417, + 433 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 22 + } + } + }, + "range": [ + 413, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 478, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "duration", + "range": [ + 468, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 467, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "range": [ + 463, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + ], + "range": [ + 519, + 534 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 537, + 541 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getBoundingClientRect", + "range": [ + 542, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "range": [ + 537, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 537, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 54 + } + } + }, + "range": [ + 519, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 54 + } + } + } + ], + "range": [ + 513, + 566 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 55 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "time", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "duration", + "range": [ + 576, + 584 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 588, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 590, + 597 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 30 + } + } + }, + "range": [ + 588, + 597 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 30 + } + } + }, + "operator": "-", + "right": { + "type": "Identifier", + "name": "left", + "range": [ + 600, + 604 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "range": [ + 588, + 604 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "range": [ + 576, + 605 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 38 + } + } + }, + "operator": "/", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "right", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 21, + "column": 42 + }, + "end": { + "line": 21, + "column": 47 + } + } + }, + "operator": "-", + "right": { + "type": "Identifier", + "name": "left", + "range": [ + 617, + 621 + ], + "loc": { + "start": { + "line": 21, + "column": 50 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + "range": [ + 609, + 621 + ], + "loc": { + "start": { + "line": 21, + "column": 42 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + "range": [ + 576, + 622 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 55 + } + } + }, + "range": [ + 569, + 622 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 55 + } + } + }, + "range": [ + 569, + 623 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 56 + } + } + } + ], + "range": [ + 196, + 626 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 177, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + ], + "range": [ + 168, + 626 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 2298, + 2313 + ], + "loc": { + "start": { + "line": 114, + "column": 16 + }, + "end": { + "line": 114, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 177, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 25 + } + } + } + } + ] + }, + { + "name": "handleMousedown", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 638, + 653 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 638, + 653 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 853, + 854 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 855, + 861 + ], + "loc": { + "start": { + "line": 30, + "column": 10 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + "range": [ + 853, + 861 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 862, + 867 + ], + "loc": { + "start": { + "line": 30, + "column": 17 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + "range": [ + 853, + 867 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 853, + 869 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 24 + } + } + }, + "range": [ + 853, + 870 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 828, + 829 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 830, + 836 + ], + "loc": { + "start": { + "line": 29, + "column": 17 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "range": [ + 828, + 836 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "play", + "range": [ + 837, + 841 + ], + "loc": { + "start": { + "line": 29, + "column": 24 + }, + "end": { + "line": 29, + "column": 28 + } + } + }, + "range": [ + 828, + 841 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 828, + 843 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 30 + } + } + }, + "range": [ + 828, + 844 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 31 + } + } + }, + "test": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "range": [ + 816, + 870 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "cancel", + "range": [ + 874, + 880 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + "optional": false, + "range": [ + 874, + 882 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "range": [ + 874, + 883 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 12 + } + } + } + ], + "range": [ + 811, + 887 + ], + "loc": { + "start": { + "line": 28, + "column": 27 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + }, + "params": [], + "range": [ + 786, + 887 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'mouseup'", + "value": "mouseup", + "range": [ + 943, + 952 + ], + "loc": { + "start": { + "line": 35, + "column": 32 + }, + "end": { + "line": 35, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 954, + 967 + ], + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 56 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 916, + 922 + ], + "loc": { + "start": { + "line": 35, + "column": 5 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "range": [ + 914, + 922 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "removeEventListener", + "range": [ + 923, + 942 + ], + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 31 + } + } + }, + "range": [ + 914, + 942 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 914, + 968 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 57 + } + } + }, + "range": [ + 914, + 969 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 58 + } + } + } + ], + "range": [ + 909, + 973 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 36, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + }, + "params": [], + "range": [ + 891, + 973 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 36, + "column": 3 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'mouseup'", + "value": "mouseup", + "range": [ + 1003, + 1012 + ], + "loc": { + "start": { + "line": 38, + "column": 28 + }, + "end": { + "line": 38, + "column": 37 + } + } + }, + { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 1014, + 1027 + ], + "loc": { + "start": { + "line": 38, + "column": 39 + }, + "end": { + "line": 38, + "column": 52 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 977, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 979, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "range": [ + 977, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "addEventListener", + "range": [ + 986, + 1002 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 977, + 1002 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 977, + 1028 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 53 + } + } + }, + "range": [ + 977, + 1029 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 54 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "cancel", + "range": [ + 1044, + 1050 + ], + "loc": { + "start": { + "line": 40, + "column": 13 + }, + "end": { + "line": 40, + "column": 19 + } + } + }, + { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 1052, + 1055 + ], + "loc": { + "start": { + "line": 40, + "column": 21 + }, + "end": { + "line": 40, + "column": 24 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 1033, + 1043 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 1033, + 1056 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 25 + } + } + }, + "range": [ + 1033, + 1057 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 26 + } + } + } + ], + "range": [ + 657, + 1060 + ], + "loc": { + "start": { + "line": 24, + "column": 29 + }, + "end": { + "line": 41, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 638, + 653 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + ], + "range": [ + 629, + 1060 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 41, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 2331, + 2346 + ], + "loc": { + "start": { + "line": 115, + "column": 16 + }, + "end": { + "line": 115, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 638, + 653 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 25 + } + } + } + } + ] + }, + { + "name": "format", + "identifiers": [ + { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "Literal", + "raw": "'...'", + "value": "...", + "range": [ + 1119, + 1124 + ], + "loc": { + "start": { + "line": 44, + "column": 29 + }, + "end": { + "line": 44, + "column": 34 + } + } + }, + "range": [ + 1112, + 1125 + ], + "loc": { + "start": { + "line": 44, + "column": 22 + }, + "end": { + "line": 44, + "column": 35 + } + } + }, + "test": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1102, + 1109 + ], + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 19 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "isNaN", + "range": [ + 1096, + 1101 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 11 + } + } + }, + "optional": false, + "range": [ + 1096, + 1110 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 20 + } + } + }, + "range": [ + 1092, + 1125 + ], + "loc": { + "start": { + "line": 44, + "column": 2 + }, + "end": { + "line": 44, + "column": 35 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 36 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "60", + "value": 60, + "range": [ + 1166, + 1168 + ], + "loc": { + "start": { + "line": 46, + "column": 39 + }, + "end": { + "line": 46, + "column": 41 + } + } + }, + "range": [ + 1156, + 1168 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 41 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "floor", + "range": [ + 1150, + 1155 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 28 + } + } + }, + "range": [ + 1145, + 1155 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 1145, + 1169 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 42 + } + } + }, + "range": [ + 1135, + 1169 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 42 + } + } + } + ], + "range": [ + 1129, + 1170 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 43 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1173, + 1180 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1194, + 1201 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 30 + } + } + }, + "operator": "%", + "right": { + "type": "Literal", + "raw": "60", + "value": 60, + "range": [ + 1204, + 1206 + ], + "loc": { + "start": { + "line": 47, + "column": 33 + }, + "end": { + "line": 47, + "column": 35 + } + } + }, + "range": [ + 1194, + 1206 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 35 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 1183, + 1187 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "floor", + "range": [ + 1188, + 1193 + ], + "loc": { + "start": { + "line": 47, + "column": 17 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "range": [ + 1183, + 1193 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1183, + 1207 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 36 + } + } + }, + "range": [ + 1173, + 1207 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 36 + } + } + }, + "range": [ + 1173, + 1208 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 37 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1229, + 1236 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 27 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "'0'", + "value": "0", + "range": [ + 1239, + 1242 + ], + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 33 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1245, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 36 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "range": [ + 1239, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "range": [ + 1229, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "range": [ + 1229, + 1253 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 44 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1215, + 1222 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "operator": "<", + "right": { + "type": "Literal", + "raw": "10", + "value": 10, + "range": [ + 1225, + 1227 + ], + "loc": { + "start": { + "line": 48, + "column": 16 + }, + "end": { + "line": 48, + "column": 18 + } + } + }, + "range": [ + 1215, + 1227 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 18 + } + } + }, + "range": [ + 1211, + 1253 + ], + "loc": { + "start": { + "line": 48, + "column": 2 + }, + "end": { + "line": 48, + "column": 44 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "minutes", + "range": [ + 1267, + 1274 + ], + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1278, + 1285 + ], + "loc": { + "start": { + "line": 50, + "column": 23 + }, + "end": { + "line": 50, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 1264, + 1267 + ], + "loc": { + "start": { + "line": 50, + "column": 9 + }, + "end": { + "line": 50, + "column": 12 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ":", + "raw": ":" + }, + "range": [ + 1274, + 1278 + ], + "loc": { + "start": { + "line": 50, + "column": 19 + }, + "end": { + "line": 50, + "column": 23 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 1285, + 1287 + ], + "loc": { + "start": { + "line": 50, + "column": 30 + }, + "end": { + "line": 50, + "column": 32 + } + } + } + ], + "range": [ + 1264, + 1287 + ], + "loc": { + "start": { + "line": 50, + "column": 9 + }, + "end": { + "line": 50, + "column": 32 + } + } + }, + "range": [ + 1257, + 1288 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 33 + } + } + } + ], + "range": [ + 1088, + 1291 + ], + "loc": { + "start": { + "line": 43, + "column": 26 + }, + "end": { + "line": 51, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + ], + "range": [ + 1063, + 1291 + ], + "loc": { + "start": { + "line": 43, + "column": 1 + }, + "end": { + "line": 51, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 2610, + 2616 + ], + "loc": { + "start": { + "line": 126, + "column": 23 + }, + "end": { + "line": 126, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 2731, + 2737 + ], + "loc": { + "start": { + "line": 128, + "column": 23 + }, + "end": { + "line": 128, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 2298, + 2313 + ], + "loc": { + "start": { + "line": 114, + "column": 16 + }, + "end": { + "line": 114, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 177, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 2331, + 2346 + ], + "loc": { + "start": { + "line": 115, + "column": 16 + }, + "end": { + "line": 115, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 638, + 653 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 2368, + 2372 + ], + "loc": { + "start": { + "line": 116, + "column": 20 + }, + "end": { + "line": 116, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2381, + 2389 + ], + "loc": { + "start": { + "line": 117, + "column": 7 + }, + "end": { + "line": 117, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 2397, + 2403 + ], + "loc": { + "start": { + "line": 118, + "column": 7 + }, + "end": { + "line": 118, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2482, + 2490 + ], + "loc": { + "start": { + "line": 122, + "column": 40 + }, + "end": { + "line": 122, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 2494, + 2506 + ], + "loc": { + "start": { + "line": 122, + "column": 52 + }, + "end": { + "line": 122, + "column": 64 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 2539, + 2543 + ], + "loc": { + "start": { + "line": 123, + "column": 21 + }, + "end": { + "line": 123, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2546, + 2554 + ], + "loc": { + "start": { + "line": 123, + "column": 28 + }, + "end": { + "line": 123, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 2610, + 2616 + ], + "loc": { + "start": { + "line": 126, + "column": 23 + }, + "end": { + "line": 126, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 2617, + 2621 + ], + "loc": { + "start": { + "line": 126, + "column": 30 + }, + "end": { + "line": 126, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 2659, + 2665 + ], + "loc": { + "start": { + "line": 127, + "column": 28 + }, + "end": { + "line": 127, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "format", + "range": [ + 2731, + 2737 + ], + "loc": { + "start": { + "line": 128, + "column": 23 + }, + "end": { + "line": 128, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 2738, + 2746 + ], + "loc": { + "start": { + "line": 128, + "column": 30 + }, + "end": { + "line": 128, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "clearTimeout", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 282, + 315 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + "range": [ + 282, + 316 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 36 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 319, + 338 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "showControls", + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 373, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 56 + }, + "end": { + "line": 14, + "column": 61 + } + } + }, + "range": [ + 358, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 61 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 352, + 378 + ], + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 61 + } + } + }, + { + "type": "Literal", + "raw": "2500", + "value": 2500, + "range": [ + 380, + 384 + ], + "loc": { + "start": { + "line": 14, + "column": 63 + }, + "end": { + "line": 14, + "column": 67 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 341, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 68 + } + } + }, + "range": [ + 319, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 68 + } + } + }, + "range": [ + 319, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 69 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "showControls", + "range": [ + 389, + 401 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 389, + 408 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + "range": [ + 389, + 409 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 435, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 24 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "buttons", + "range": [ + 421, + 428 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "range": [ + 419, + 428 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "operator": "&", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 431, + 432 + ], + "loc": { + "start": { + "line": 17, + "column": 20 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 419, + 432 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 417, + 433 + ], + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 22 + } + } + }, + "range": [ + 413, + 442 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 31 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 478, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "duration", + "range": [ + 468, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 467, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 6 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "range": [ + 463, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + ], + "range": [ + 519, + 534 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 537, + 541 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getBoundingClientRect", + "range": [ + 542, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "range": [ + 537, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 537, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 54 + } + } + }, + "range": [ + 519, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 54 + } + } + } + ], + "range": [ + 513, + 566 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 55 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "time", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "duration", + "range": [ + 576, + 584 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 588, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 590, + 597 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 30 + } + } + }, + "range": [ + 588, + 597 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 30 + } + } + }, + "operator": "-", + "right": { + "type": "Identifier", + "name": "left", + "range": [ + 600, + 604 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "range": [ + 588, + 604 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "range": [ + 576, + 605 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 38 + } + } + }, + "operator": "/", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "right", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 21, + "column": 42 + }, + "end": { + "line": 21, + "column": 47 + } + } + }, + "operator": "-", + "right": { + "type": "Identifier", + "name": "left", + "range": [ + 617, + 621 + ], + "loc": { + "start": { + "line": 21, + "column": 50 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + "range": [ + 609, + 621 + ], + "loc": { + "start": { + "line": 21, + "column": 42 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + "range": [ + 576, + 622 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 55 + } + } + }, + "range": [ + 569, + 622 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 55 + } + } + }, + "range": [ + 569, + 623 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 56 + } + } + } + ], + "range": [ + 196, + 626 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousemove", + "range": [ + 177, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + ], + "range": [ + 168, + 626 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 588, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + } + ] + }, + { + "name": "left", + "identifiers": [ + { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + ], + "range": [ + 519, + 534 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 537, + 541 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getBoundingClientRect", + "range": [ + 542, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "range": [ + 537, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 537, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 54 + } + } + }, + "range": [ + 519, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "left", + "range": [ + 600, + 604 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "left", + "range": [ + 617, + 621 + ], + "loc": { + "start": { + "line": 21, + "column": 50 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + } + ] + }, + { + "name": "right", + "identifiers": [ + { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + ], + "range": [ + 519, + 534 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 537, + 541 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getBoundingClientRect", + "range": [ + 542, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "range": [ + 537, + 563 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 537, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 54 + } + } + }, + "range": [ + 519, + 565 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "right", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 21, + "column": 42 + }, + "end": { + "line": 21, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "clearTimeout", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 319, + 338 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 389, + 401 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 419, + 420 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 468, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 576, + 584 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 588, + 589 + ], + "loc": { + "start": { + "line": 21, + "column": 21 + }, + "end": { + "line": 21, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "left", + "range": [ + 600, + 604 + ], + "loc": { + "start": { + "line": 21, + "column": 33 + }, + "end": { + "line": 21, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "right", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 21, + "column": 42 + }, + "end": { + "line": 21, + "column": 47 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "right", + "range": [ + 527, + 532 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "left", + "range": [ + 617, + 621 + ], + "loc": { + "start": { + "line": 21, + "column": 50 + }, + "end": { + "line": 21, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "left", + "range": [ + 521, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clearTimeout", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 295, + 314 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 319, + 338 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControlsTimeout", + "range": [ + 145, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 14, + "column": 53 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "showControls", + "range": [ + 389, + 401 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "showControls", + "range": [ + 119, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 468, + 476 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "time", + "range": [ + 569, + 573 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "duration", + "range": [ + 576, + 584 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 21, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "duration", + "range": [ + 83, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 853, + 854 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 855, + 861 + ], + "loc": { + "start": { + "line": 30, + "column": 10 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + "range": [ + 853, + 861 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 862, + 867 + ], + "loc": { + "start": { + "line": 30, + "column": 17 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + "range": [ + 853, + 867 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 853, + 869 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 24 + } + } + }, + "range": [ + 853, + 870 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 828, + 829 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 830, + 836 + ], + "loc": { + "start": { + "line": 29, + "column": 17 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "range": [ + 828, + 836 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "play", + "range": [ + 837, + 841 + ], + "loc": { + "start": { + "line": 29, + "column": 24 + }, + "end": { + "line": 29, + "column": 28 + } + } + }, + "range": [ + 828, + 841 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 828, + 843 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 30 + } + } + }, + "range": [ + 828, + 844 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 31 + } + } + }, + "test": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "range": [ + 816, + 870 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "cancel", + "range": [ + 874, + 880 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + "optional": false, + "range": [ + 874, + 882 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "range": [ + 874, + 883 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 12 + } + } + } + ], + "range": [ + 811, + 887 + ], + "loc": { + "start": { + "line": 28, + "column": 27 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + }, + "params": [], + "range": [ + 786, + 887 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'mouseup'", + "value": "mouseup", + "range": [ + 943, + 952 + ], + "loc": { + "start": { + "line": 35, + "column": 32 + }, + "end": { + "line": 35, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 954, + 967 + ], + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 56 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 916, + 922 + ], + "loc": { + "start": { + "line": 35, + "column": 5 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "range": [ + 914, + 922 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "removeEventListener", + "range": [ + 923, + 942 + ], + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 31 + } + } + }, + "range": [ + 914, + 942 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 914, + 968 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 57 + } + } + }, + "range": [ + 914, + 969 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 58 + } + } + } + ], + "range": [ + 909, + 973 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 36, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + }, + "params": [], + "range": [ + 891, + 973 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 36, + "column": 3 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'mouseup'", + "value": "mouseup", + "range": [ + 1003, + 1012 + ], + "loc": { + "start": { + "line": 38, + "column": 28 + }, + "end": { + "line": 38, + "column": 37 + } + } + }, + { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 1014, + 1027 + ], + "loc": { + "start": { + "line": 38, + "column": 39 + }, + "end": { + "line": 38, + "column": 52 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 977, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 979, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 4 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "range": [ + 977, + 985 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "addEventListener", + "range": [ + 986, + 1002 + ], + "loc": { + "start": { + "line": 38, + "column": 11 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "range": [ + 977, + 1002 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 977, + 1028 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 53 + } + } + }, + "range": [ + 977, + 1029 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 54 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "cancel", + "range": [ + 1044, + 1050 + ], + "loc": { + "start": { + "line": 40, + "column": 13 + }, + "end": { + "line": 40, + "column": 19 + } + } + }, + { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 1052, + 1055 + ], + "loc": { + "start": { + "line": 40, + "column": 21 + }, + "end": { + "line": 40, + "column": 24 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 1033, + 1043 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 1033, + 1056 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 25 + } + } + }, + "range": [ + 1033, + 1057 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 26 + } + } + } + ], + "range": [ + 657, + 1060 + ], + "loc": { + "start": { + "line": 24, + "column": 29 + }, + "end": { + "line": 41, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMousedown", + "range": [ + 638, + 653 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 25 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + ], + "range": [ + 629, + 1060 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 41, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 828, + 829 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 853, + 854 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 977, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + } + ] + }, + { + "name": "handleMouseup", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 853, + 854 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 855, + 861 + ], + "loc": { + "start": { + "line": 30, + "column": 10 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + "range": [ + 853, + 861 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 862, + 867 + ], + "loc": { + "start": { + "line": 30, + "column": 17 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + "range": [ + 853, + 867 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 853, + 869 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 24 + } + } + }, + "range": [ + 853, + 870 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 828, + 829 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 830, + 836 + ], + "loc": { + "start": { + "line": 29, + "column": 17 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "range": [ + 828, + 836 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "play", + "range": [ + 837, + 841 + ], + "loc": { + "start": { + "line": 29, + "column": 24 + }, + "end": { + "line": 29, + "column": 28 + } + } + }, + "range": [ + 828, + 841 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 828, + 843 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 30 + } + } + }, + "range": [ + 828, + 844 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 31 + } + } + }, + "test": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "range": [ + 816, + 870 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 30, + "column": 25 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "cancel", + "range": [ + 874, + 880 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + "optional": false, + "range": [ + 874, + 882 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "range": [ + 874, + 883 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 12 + } + } + } + ], + "range": [ + 811, + 887 + ], + "loc": { + "start": { + "line": 28, + "column": 27 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + }, + "params": [], + "range": [ + 786, + 887 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 32, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 954, + 967 + ], + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 56 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 1014, + 1027 + ], + "loc": { + "start": { + "line": 38, + "column": 39 + }, + "end": { + "line": 38, + "column": 52 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + } + } + ] + }, + { + "name": "cancel", + "identifiers": [ + { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'mouseup'", + "value": "mouseup", + "range": [ + 943, + 952 + ], + "loc": { + "start": { + "line": 35, + "column": 32 + }, + "end": { + "line": 35, + "column": 41 + } + } + }, + { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 954, + 967 + ], + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 56 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 916, + 922 + ], + "loc": { + "start": { + "line": 35, + "column": 5 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "range": [ + 914, + 922 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "removeEventListener", + "range": [ + 923, + 942 + ], + "loc": { + "start": { + "line": 35, + "column": 12 + }, + "end": { + "line": 35, + "column": 31 + } + } + }, + "range": [ + 914, + 942 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 914, + 968 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 57 + } + } + }, + "range": [ + 914, + 969 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 58 + } + } + } + ], + "range": [ + 909, + 973 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 36, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + }, + "params": [], + "range": [ + 891, + 973 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 36, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cancel", + "range": [ + 874, + 880 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cancel", + "range": [ + 1044, + 1050 + ], + "loc": { + "start": { + "line": 40, + "column": 13 + }, + "end": { + "line": 40, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 977, + 978 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 1014, + 1027 + ], + "loc": { + "start": { + "line": 38, + "column": 39 + }, + "end": { + "line": 38, + "column": 52 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 1033, + 1043 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "cancel", + "range": [ + 1044, + 1050 + ], + "loc": { + "start": { + "line": 40, + "column": 13 + }, + "end": { + "line": 40, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 828, + 829 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 853, + 854 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cancel", + "range": [ + 874, + 880 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 828, + 829 + ], + "loc": { + "start": { + "line": 29, + "column": 15 + }, + "end": { + "line": 29, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 853, + 854 + ], + "loc": { + "start": { + "line": 30, + "column": 8 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cancel", + "range": [ + 874, + 880 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cancel", + "range": [ + 900, + 906 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 17 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 954, + 967 + ], + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 56 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 914, + 915 + ], + "loc": { + "start": { + "line": 35, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 654, + 655 + ], + "loc": { + "start": { + "line": 24, + "column": 26 + }, + "end": { + "line": 24, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 954, + 967 + ], + "loc": { + "start": { + "line": 35, + "column": 43 + }, + "end": { + "line": 35, + "column": 56 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseup", + "range": [ + 795, + 808 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 24 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 1033, + 1043 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "seconds", + "identifiers": [ + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "Literal", + "raw": "'...'", + "value": "...", + "range": [ + 1119, + 1124 + ], + "loc": { + "start": { + "line": 44, + "column": 29 + }, + "end": { + "line": 44, + "column": 34 + } + } + }, + "range": [ + 1112, + 1125 + ], + "loc": { + "start": { + "line": 44, + "column": 22 + }, + "end": { + "line": 44, + "column": 35 + } + } + }, + "test": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1102, + 1109 + ], + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 19 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "isNaN", + "range": [ + 1096, + 1101 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 11 + } + } + }, + "optional": false, + "range": [ + 1096, + 1110 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 20 + } + } + }, + "range": [ + 1092, + 1125 + ], + "loc": { + "start": { + "line": 44, + "column": 2 + }, + "end": { + "line": 44, + "column": 35 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 36 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "60", + "value": 60, + "range": [ + 1166, + 1168 + ], + "loc": { + "start": { + "line": 46, + "column": 39 + }, + "end": { + "line": 46, + "column": 41 + } + } + }, + "range": [ + 1156, + 1168 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 41 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "floor", + "range": [ + 1150, + 1155 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 28 + } + } + }, + "range": [ + 1145, + 1155 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 1145, + 1169 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 42 + } + } + }, + "range": [ + 1135, + 1169 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 42 + } + } + } + ], + "range": [ + 1129, + 1170 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 43 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1173, + 1180 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1194, + 1201 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 30 + } + } + }, + "operator": "%", + "right": { + "type": "Literal", + "raw": "60", + "value": 60, + "range": [ + 1204, + 1206 + ], + "loc": { + "start": { + "line": 47, + "column": 33 + }, + "end": { + "line": 47, + "column": 35 + } + } + }, + "range": [ + 1194, + 1206 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 35 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 1183, + 1187 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "floor", + "range": [ + 1188, + 1193 + ], + "loc": { + "start": { + "line": 47, + "column": 17 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "range": [ + 1183, + 1193 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 1183, + 1207 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 36 + } + } + }, + "range": [ + 1173, + 1207 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 36 + } + } + }, + "range": [ + 1173, + 1208 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 37 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1229, + 1236 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 27 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "'0'", + "value": "0", + "range": [ + 1239, + 1242 + ], + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 33 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1245, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 36 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "range": [ + 1239, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 30 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "range": [ + 1229, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "range": [ + 1229, + 1253 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 44 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1215, + 1222 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "operator": "<", + "right": { + "type": "Literal", + "raw": "10", + "value": 10, + "range": [ + 1225, + 1227 + ], + "loc": { + "start": { + "line": 48, + "column": 16 + }, + "end": { + "line": 48, + "column": 18 + } + } + }, + "range": [ + 1215, + 1227 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 18 + } + } + }, + "range": [ + 1211, + 1253 + ], + "loc": { + "start": { + "line": 48, + "column": 2 + }, + "end": { + "line": 48, + "column": 44 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "Identifier", + "name": "minutes", + "range": [ + 1267, + 1274 + ], + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1278, + 1285 + ], + "loc": { + "start": { + "line": 50, + "column": 23 + }, + "end": { + "line": 50, + "column": 30 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 1264, + 1267 + ], + "loc": { + "start": { + "line": 50, + "column": 9 + }, + "end": { + "line": 50, + "column": 12 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ":", + "raw": ":" + }, + "range": [ + 1274, + 1278 + ], + "loc": { + "start": { + "line": 50, + "column": 19 + }, + "end": { + "line": 50, + "column": 23 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 1285, + 1287 + ], + "loc": { + "start": { + "line": 50, + "column": 30 + }, + "end": { + "line": 50, + "column": 32 + } + } + } + ], + "range": [ + 1264, + 1287 + ], + "loc": { + "start": { + "line": 50, + "column": 9 + }, + "end": { + "line": 50, + "column": 32 + } + } + }, + "range": [ + 1257, + 1288 + ], + "loc": { + "start": { + "line": 50, + "column": 2 + }, + "end": { + "line": 50, + "column": 33 + } + } + } + ], + "range": [ + 1088, + 1291 + ], + "loc": { + "start": { + "line": 43, + "column": 26 + }, + "end": { + "line": 51, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "format", + "range": [ + 1072, + 1078 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + ], + "range": [ + 1063, + 1291 + ], + "loc": { + "start": { + "line": 43, + "column": 1 + }, + "end": { + "line": 51, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1102, + 1109 + ], + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1173, + 1180 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1194, + 1201 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1215, + 1222 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1229, + 1236 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 27 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1245, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 36 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1278, + 1285 + ], + "loc": { + "start": { + "line": 50, + "column": 23 + }, + "end": { + "line": 50, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + } + ] + }, + { + "name": "minutes", + "identifiers": [ + { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 36 + } + } + }, + "operator": "/", + "right": { + "type": "Literal", + "raw": "60", + "value": 60, + "range": [ + 1166, + 1168 + ], + "loc": { + "start": { + "line": 46, + "column": 39 + }, + "end": { + "line": 46, + "column": 41 + } + } + }, + "range": [ + 1156, + 1168 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 41 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "floor", + "range": [ + 1150, + 1155 + ], + "loc": { + "start": { + "line": 46, + "column": 23 + }, + "end": { + "line": 46, + "column": 28 + } + } + }, + "range": [ + 1145, + 1155 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 28 + } + } + }, + "optional": false, + "range": [ + 1145, + 1169 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 42 + } + } + }, + "range": [ + 1135, + 1169 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 42 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1267, + 1274 + ], + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "isNaN", + "range": [ + 1096, + 1101 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1102, + 1109 + ], + "loc": { + "start": { + "line": 44, + "column": 12 + }, + "end": { + "line": 44, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1156, + 1163 + ], + "loc": { + "start": { + "line": 46, + "column": 29 + }, + "end": { + "line": 46, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1173, + 1180 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1183, + 1187 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1194, + 1201 + ], + "loc": { + "start": { + "line": 47, + "column": 23 + }, + "end": { + "line": 47, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1215, + 1222 + ], + "loc": { + "start": { + "line": 48, + "column": 6 + }, + "end": { + "line": 48, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1229, + 1236 + ], + "loc": { + "start": { + "line": 48, + "column": 20 + }, + "end": { + "line": 48, + "column": 27 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1245, + 1252 + ], + "loc": { + "start": { + "line": 48, + "column": 36 + }, + "end": { + "line": 48, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1267, + 1274 + ], + "loc": { + "start": { + "line": 50, + "column": 12 + }, + "end": { + "line": 50, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "minutes", + "range": [ + 1135, + 1142 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1278, + 1285 + ], + "loc": { + "start": { + "line": 50, + "column": 23 + }, + "end": { + "line": 50, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 1079, + 1086 + ], + "loc": { + "start": { + "line": 43, + "column": 17 + }, + "end": { + "line": 43, + "column": 24 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "isNaN", + "range": [ + 1096, + 1101 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1183, + 1187 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clearTimeout", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 1033, + 1043 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "isNaN", + "range": [ + 1096, + 1101 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1183, + 1187 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clearTimeout", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 341, + 351 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 1033, + 1043 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "isNaN", + "range": [ + 1096, + 1101 + ], + "loc": { + "start": { + "line": 44, + "column": 6 + }, + "end": { + "line": 44, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1145, + 1149 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 46, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 1183, + 1187 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json new file mode 100644 index 00000000..d481bb78 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json @@ -0,0 +1,700 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "AudioPlayer", + "identifiers": [ + { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 202, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 426, + 437 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 657, + 668 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 889, + 900 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 34, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 1157, + 1168 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "stopAll", + "identifiers": [ + { + "type": "Identifier", + "name": "stopAll", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "local": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 100, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 100, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 202, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 426, + 437 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 657, + 668 + ], + "loc": { + "start": { + "line": 26, + "column": 1 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 889, + 900 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 34, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 1157, + 1168 + ], + "loc": { + "start": { + "line": 42, + "column": 1 + }, + "end": { + "line": 42, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json new file mode 100644 index 00000000..e277ad25 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json @@ -0,0 +1,4401 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "elements", + "identifiers": [ + { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "Set", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 44, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 33, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 87, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 336, + 344 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 372, + 380 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 429, + 437 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "stopAll", + "identifiers": [ + { + "type": "Identifier", + "name": "stopAll", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "element", + "range": [ + 120, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 120, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 120, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 120, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 115, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "element", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 104, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "elements", + "range": [ + 87, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "forEach", + "range": [ + 96, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 87, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "optional": false, + "range": [ + 87, + 141 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + "range": [ + 87, + 142 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 7, + "column": 5 + } + } + } + ], + "range": [ + 83, + 145 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "stopAll", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "params": [], + "range": [ + 64, + 145 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "onMount", + "identifiers": [ + { + "type": "Identifier", + "name": "onMount", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onMount", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onMount", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "onMount", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 318, + 325 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + } + } + ] + }, + { + "name": "src", + "identifiers": [ + { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "init": null, + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 893, + 896 + ], + "loc": { + "start": { + "line": 50, + "column": 3 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + } + } + ] + }, + { + "name": "title", + "identifiers": [ + { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "init": null, + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 738, + 743 + ], + "loc": { + "start": { + "line": 42, + "column": 6 + }, + "end": { + "line": 42, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + } + ] + }, + { + "name": "composer", + "identifiers": [ + { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "init": null, + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "composer", + "range": [ + 763, + 771 + ], + "loc": { + "start": { + "line": 43, + "column": 13 + }, + "end": { + "line": 43, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + } + } + ] + }, + { + "name": "performer", + "identifiers": [ + { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "init": null, + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "performer", + "range": [ + 798, + 807 + ], + "loc": { + "start": { + "line": 43, + "column": 48 + }, + "end": { + "line": 43, + "column": 57 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + } + ] + }, + { + "name": "audio", + "identifiers": [ + { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "init": null, + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 349, + 354 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 478, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 835, + 840 + ], + "loc": { + "start": { + "line": 46, + "column": 13 + }, + "end": { + "line": 46, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ] + }, + { + "name": "paused", + "identifiers": [ + { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 310, + 314 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + "range": [ + 301, + 314 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 723, + 729 + ], + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 849, + 855 + ], + "loc": { + "start": { + "line": 47, + "column": 7 + }, + "end": { + "line": 47, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + } + ] + }, + { + "name": "stopOthers", + "identifiers": [ + { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 412, + 422 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 412, + 422 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "element", + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 493, + 498 + ], + "loc": { + "start": { + "line": 29, + "column": 34 + }, + "end": { + "line": 29, + "column": 39 + } + } + }, + "range": [ + 485, + 498 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 39 + } + } + }, + "optional": false, + "range": [ + 485, + 500 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 41 + } + } + }, + "range": [ + 485, + 501 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 42 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "element", + "range": [ + 466, + 473 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "audio", + "range": [ + 478, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "range": [ + 466, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "range": [ + 462, + 501 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 29, + "column": 42 + } + } + } + ], + "range": [ + 457, + 505 + ], + "loc": { + "start": { + "line": 28, + "column": 30 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + ], + "range": [ + 446, + 505 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 30, + "column": 3 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "elements", + "range": [ + 429, + 437 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "forEach", + "range": [ + 438, + 445 + ], + "loc": { + "start": { + "line": 28, + "column": 11 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + "range": [ + 429, + 445 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + "optional": false, + "range": [ + 429, + 506 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 30, + "column": 4 + } + } + }, + "range": [ + 429, + 507 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 30, + "column": 5 + } + } + } + ], + "range": [ + 425, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 31, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 412, + 422 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 20 + } + } + }, + "params": [], + "range": [ + 403, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 1 + }, + "end": { + "line": 31, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 867, + 877 + ], + "loc": { + "start": { + "line": 48, + "column": 11 + }, + "end": { + "line": 48, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 412, + 422 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Set", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 318, + 325 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 723, + 729 + ], + "loc": { + "start": { + "line": 41, + "column": 25 + }, + "end": { + "line": 41, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 738, + 743 + ], + "loc": { + "start": { + "line": 42, + "column": 6 + }, + "end": { + "line": 42, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "composer", + "range": [ + 763, + 771 + ], + "loc": { + "start": { + "line": 43, + "column": 13 + }, + "end": { + "line": 43, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "composer", + "range": [ + 250, + 258 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "performer", + "range": [ + 798, + 807 + ], + "loc": { + "start": { + "line": 43, + "column": 48 + }, + "end": { + "line": 43, + "column": 57 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "performer", + "range": [ + 272, + 281 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 835, + 840 + ], + "loc": { + "start": { + "line": 46, + "column": 13 + }, + "end": { + "line": 46, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 849, + 855 + ], + "loc": { + "start": { + "line": 47, + "column": 7 + }, + "end": { + "line": 47, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 301, + 307 + ], + "loc": { + "start": { + "line": 20, + "column": 5 + }, + "end": { + "line": 20, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 867, + 877 + ], + "loc": { + "start": { + "line": 48, + "column": 11 + }, + "end": { + "line": 48, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 412, + 422 + ], + "loc": { + "start": { + "line": 27, + "column": 10 + }, + "end": { + "line": 27, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 893, + 896 + ], + "loc": { + "start": { + "line": 50, + "column": 3 + }, + "end": { + "line": 50, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 214, + 217 + ], + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 87, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "element", + "identifiers": [ + { + "type": "Identifier", + "name": "element", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "element", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "element", + "range": [ + 120, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 120, + 133 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 120, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 120, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 115, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "element", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 104, + 140 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "element", + "range": [ + 120, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "element", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "element", + "range": [ + 120, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "element", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 87, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 336, + 344 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 349, + 354 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 372, + 380 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 372, + 380 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 336, + 344 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 23, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 349, + 354 + ], + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 372, + 380 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 429, + 437 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "element", + "identifiers": [ + { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "element", + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 493, + 498 + ], + "loc": { + "start": { + "line": 29, + "column": 34 + }, + "end": { + "line": 29, + "column": 39 + } + } + }, + "range": [ + 485, + 498 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 39 + } + } + }, + "optional": false, + "range": [ + 485, + 500 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 41 + } + } + }, + "range": [ + 485, + 501 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 42 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "element", + "range": [ + 466, + 473 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "audio", + "range": [ + 478, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "range": [ + 466, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "range": [ + 462, + 501 + ], + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 29, + "column": 42 + } + } + } + ], + "range": [ + 457, + 505 + ], + "loc": { + "start": { + "line": 28, + "column": 30 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + ], + "range": [ + 446, + 505 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 30, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "element", + "range": [ + 466, + 473 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "element", + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "element", + "range": [ + 466, + 473 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 478, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "element", + "range": [ + 485, + 492 + ], + "loc": { + "start": { + "line": 29, + "column": 26 + }, + "end": { + "line": 29, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "element", + "range": [ + 446, + 453 + ], + "loc": { + "start": { + "line": 28, + "column": 19 + }, + "end": { + "line": 28, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 478, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "elements", + "range": [ + 429, + 437 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "elements", + "range": [ + 33, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 478, + 483 + ], + "loc": { + "start": { + "line": 29, + "column": 19 + }, + "end": { + "line": 29, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 289, + 294 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Set", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Set", + "range": [ + 48, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json new file mode 100644 index 00000000..02e1e272 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json @@ -0,0 +1,4211 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "scoops", + "identifiers": [ + { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 14, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 375, + 381 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 454, + 460 + ], + "loc": { + "start": { + "line": 25, + "column": 31 + }, + "end": { + "line": 25, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 534, + 540 + ], + "loc": { + "start": { + "line": 30, + "column": 31 + }, + "end": { + "line": 30, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 832, + 838 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 915, + 921 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 924, + 930 + ], + "loc": { + "start": { + "line": 50, + "column": 24 + }, + "end": { + "line": 50, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "flavours", + "identifiers": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'Mint choc chip'", + "value": "Mint choc chip", + "range": [ + 43, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + ], + "range": [ + 42, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 31, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 625, + 633 + ], + "loc": { + "start": { + "line": 36, + "column": 29 + }, + "end": { + "line": 36, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 738, + 746 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 814, + 822 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 970, + 978 + ], + "loc": { + "start": { + "line": 51, + "column": 11 + }, + "end": { + "line": 51, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + }, + { + "name": "menu", + "identifiers": [ + { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'Cookies and cream'", + "value": "Cookies and cream", + "range": [ + 79, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Literal", + "raw": "'Mint choc chip'", + "value": "Mint choc chip", + "range": [ + 102, + 118 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": "Literal", + "raw": "'Raspberry ripple'", + "value": "Raspberry ripple", + "range": [ + 122, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "range": [ + 75, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "range": [ + 68, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 644, + 648 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + } + ] + }, + { + "name": "join", + "identifiers": [ + { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 209, + 217 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 45 + }, + "end": { + "line": 12, + "column": 46 + } + } + }, + "range": [ + 209, + 220 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + "range": [ + 202, + 221 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 48 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 188, + 194 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "range": [ + 179, + 194 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 26 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "range": [ + 179, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "range": [ + 175, + 221 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 48 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "', '", + "value": ", ", + "range": [ + 261, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 39 + }, + "end": { + "line": 13, + "column": 43 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 28 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 252, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 32 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 234, + 242 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 243, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "range": [ + 234, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 234, + 255 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "join", + "range": [ + 256, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 234, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "optional": false, + "range": [ + 234, + 266 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 44 + } + } + }, + { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 274, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 52 + }, + "end": { + "line": 13, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 283, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 69 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 292, + 298 + ], + "loc": { + "start": { + "line": 13, + "column": 70 + }, + "end": { + "line": 13, + "column": 76 + } + } + }, + "range": [ + 283, + 298 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 76 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 13, + "column": 79 + }, + "end": { + "line": 13, + "column": 80 + } + } + }, + "range": [ + 283, + 302 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 80 + } + } + }, + "range": [ + 274, + 303 + ], + "loc": { + "start": { + "line": 13, + "column": 52 + }, + "end": { + "line": 13, + "column": 81 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 231, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " and ", + "raw": " and " + }, + "range": [ + 266, + 274 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 52 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 303, + 305 + ], + "loc": { + "start": { + "line": 13, + "column": 81 + }, + "end": { + "line": 13, + "column": 83 + } + } + } + ], + "range": [ + 231, + 305 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 83 + } + } + }, + "range": [ + 224, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 84 + } + } + } + ], + "range": [ + 171, + 309 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + ], + "range": [ + 147, + 309 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "join", + "range": [ + 965, + 969 + ], + "loc": { + "start": { + "line": 51, + "column": 6 + }, + "end": { + "line": 51, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 375, + 381 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 454, + 460 + ], + "loc": { + "start": { + "line": 25, + "column": 31 + }, + "end": { + "line": 25, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 534, + 540 + ], + "loc": { + "start": { + "line": 30, + "column": 31 + }, + "end": { + "line": 30, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 625, + 633 + ], + "loc": { + "start": { + "line": 36, + "column": 29 + }, + "end": { + "line": 36, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "menu", + "range": [ + 644, + 648 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "menu", + "range": [ + 68, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 738, + 746 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 814, + 822 + ], + "loc": { + "start": { + "line": 46, + "column": 10 + }, + "end": { + "line": 46, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 832, + 838 + ], + "loc": { + "start": { + "line": 46, + "column": 28 + }, + "end": { + "line": 46, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "flavours", + "identifiers": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 209, + 217 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 12, + "column": 45 + }, + "end": { + "line": 12, + "column": 46 + } + } + }, + "range": [ + 209, + 220 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + "range": [ + 202, + 221 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 48 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 188, + 194 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "range": [ + 179, + 194 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 21 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 26 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "range": [ + 179, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "range": [ + 175, + 221 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 48 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "', '", + "value": ", ", + "range": [ + 261, + 265 + ], + "loc": { + "start": { + "line": 13, + "column": 39 + }, + "end": { + "line": 13, + "column": 43 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 28 + } + } + }, + { + "type": "UnaryExpression", + "argument": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 252, + 254 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 32 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 234, + 242 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 243, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "range": [ + 234, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 234, + 255 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "join", + "range": [ + 256, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 234, + 260 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "optional": false, + "range": [ + 234, + 266 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 44 + } + } + }, + { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 274, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 52 + }, + "end": { + "line": 13, + "column": 60 + } + } + }, + "optional": false, + "property": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "flavours", + "range": [ + 283, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 69 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 292, + 298 + ], + "loc": { + "start": { + "line": 13, + "column": 70 + }, + "end": { + "line": 13, + "column": 76 + } + } + }, + "range": [ + 283, + 298 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 76 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 301, + 302 + ], + "loc": { + "start": { + "line": 13, + "column": 79 + }, + "end": { + "line": 13, + "column": 80 + } + } + }, + "range": [ + 283, + 302 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 80 + } + } + }, + "range": [ + 274, + 303 + ], + "loc": { + "start": { + "line": 13, + "column": 52 + }, + "end": { + "line": 13, + "column": 81 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 231, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " and ", + "raw": " and " + }, + "range": [ + 266, + 274 + ], + "loc": { + "start": { + "line": 13, + "column": 44 + }, + "end": { + "line": 13, + "column": 52 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "", + "raw": "" + }, + "range": [ + 303, + 305 + ], + "loc": { + "start": { + "line": 13, + "column": 81 + }, + "end": { + "line": 13, + "column": 83 + } + } + } + ], + "range": [ + 231, + 305 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 83 + } + } + }, + "range": [ + 224, + 306 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 84 + } + } + } + ], + "range": [ + 171, + 309 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + ], + "range": [ + 147, + 309 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 209, + 217 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 234, + 242 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 274, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 52 + }, + "end": { + "line": 13, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 283, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 69 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 179, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 209, + 217 + ], + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 234, + 242 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 274, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 52 + }, + "end": { + "line": 13, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 283, + 291 + ], + "loc": { + "start": { + "line": 13, + "column": 61 + }, + "end": { + "line": 13, + "column": 69 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 161, + 169 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "function", + "variables": [ + { + "name": "flavour", + "identifiers": [ + { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "menu", + "range": [ + 644, + 648 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "option", + "range": [ + 664, + 670 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "value", + "range": [ + 671, + 676 + ], + "loc": { + "start": { + "line": 38, + "column": 10 + }, + "end": { + "line": 38, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "flavour", + "range": [ + 678, + 685 + ], + "loc": { + "start": { + "line": 38, + "column": 17 + }, + "end": { + "line": 38, + "column": 24 + } + } + }, + "range": [ + 677, + 686 + ], + "loc": { + "start": { + "line": 38, + "column": 16 + }, + "end": { + "line": 38, + "column": 25 + } + } + } + ], + "range": [ + 671, + 686 + ], + "loc": { + "start": { + "line": 38, + "column": 10 + }, + "end": { + "line": 38, + "column": 25 + } + } + } + ], + "selfClosing": false, + "range": [ + 663, + 687 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 26 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 687, + 691 + ], + "loc": { + "start": { + "line": 38, + "column": 26 + }, + "end": { + "line": 39, + "column": 3 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "flavour", + "range": [ + 692, + 699 + ], + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 11 + } + } + }, + "range": [ + 691, + 700 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 700, + 703 + ], + "loc": { + "start": { + "line": 39, + "column": 12 + }, + "end": { + "line": 40, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 703, + 712 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 11 + } + } + }, + "range": [ + 663, + 712 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 40, + "column": 11 + } + } + } + ], + "else": null, + "range": [ + 637, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 1 + }, + "end": { + "line": 41, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 678, + 685 + ], + "loc": { + "start": { + "line": 38, + "column": 17 + }, + "end": { + "line": 38, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 692, + 699 + ], + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 678, + 685 + ], + "loc": { + "start": { + "line": 38, + "column": 17 + }, + "end": { + "line": 38, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavour", + "range": [ + 692, + 699 + ], + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavour", + "range": [ + 652, + 659 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 915, + 921 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 924, + 930 + ], + "loc": { + "start": { + "line": 50, + "column": 24 + }, + "end": { + "line": 50, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "join", + "range": [ + 965, + 969 + ], + "loc": { + "start": { + "line": 51, + "column": 6 + }, + "end": { + "line": 51, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 970, + 978 + ], + "loc": { + "start": { + "line": 51, + "column": 11 + }, + "end": { + "line": 51, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 915, + 921 + ], + "loc": { + "start": { + "line": 50, + "column": 15 + }, + "end": { + "line": 50, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "scoops", + "range": [ + 924, + 930 + ], + "loc": { + "start": { + "line": 50, + "column": 24 + }, + "end": { + "line": 50, + "column": 30 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "scoops", + "range": [ + 14, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "join", + "range": [ + 965, + 969 + ], + "loc": { + "start": { + "line": 51, + "column": 6 + }, + "end": { + "line": 51, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "join", + "range": [ + 156, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "flavours", + "range": [ + 970, + 978 + ], + "loc": { + "start": { + "line": 51, + "column": 11 + }, + "end": { + "line": 51, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flavours", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json new file mode 100644 index 00000000..fd1807df --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "ContactCard", + "identifiers": [ + { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 70, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 70, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "ContactCard", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json new file mode 100644 index 00000000..fbd69ca8 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Nested", + "identifiers": [ + { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 88, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Nested", + "range": [ + 88, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Nested", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json new file mode 100644 index 00000000..6d748fad --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json @@ -0,0 +1,1040 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 227, + 228 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 264, + 265 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 227, + 228 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 264, + 265 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json new file mode 100644 index 00000000..1341eafc --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json @@ -0,0 +1,1040 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 278, + 279 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 290, + 291 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 199, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 31 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 278, + 279 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 290, + 291 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 294, + 295 + ], + "loc": { + "start": { + "line": 16, + "column": 20 + }, + "end": { + "line": 16, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json new file mode 100644 index 00000000..d03483ce --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json @@ -0,0 +1,1278 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onDestroy", + "identifiers": [ + { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "local": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "seconds", + "identifiers": [ + { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 52, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 43 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 211, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 221, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "name": "interval", + "identifiers": [ + { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "seconds", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 43 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 47 + }, + "end": { + "line": 5, + "column": 48 + } + } + }, + "range": [ + 101, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 48 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 95, + 113 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 48 + } + } + }, + { + "type": "Literal", + "raw": "1000", + "value": 1000, + "range": [ + 115, + 119 + ], + "loc": { + "start": { + "line": 5, + "column": 50 + }, + "end": { + "line": 5, + "column": 54 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setInterval", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 83, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 55 + } + } + }, + "range": [ + 72, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 55 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "interval", + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setInterval", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 124, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onDestroy", + "range": [ + 19, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 211, + 218 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 221, + 228 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 43 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "seconds", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 43 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "seconds", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "clearInterval", + "range": [ + 140, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "interval", + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "clearInterval", + "range": [ + 140, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "interval", + "range": [ + 154, + 162 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "interval", + "range": [ + 72, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "setInterval", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "clearInterval", + "range": [ + 140, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "setInterval", + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "clearInterval", + "range": [ + 140, + 153 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json new file mode 100644 index 00000000..f5fc6fca --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json @@ -0,0 +1,2107 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "onMount", + "identifiers": [ + { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 65, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "photos", + "identifiers": [ + { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [], + "range": [ + 59, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "range": [ + 50, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 173, + 179 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 436, + 442 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "onMount", + "range": [ + 65, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "onMount", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 436, + 442 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "res", + "identifiers": [ + { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "init": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "https://jsonplaceholder.typicode.com/photos?_limit=20", + "raw": "https://jsonplaceholder.typicode.com/photos?_limit=20" + }, + "range": [ + 113, + 168 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 81 + } + } + } + ], + "range": [ + 113, + 168 + ], + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 81 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "fetch", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 107, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 82 + } + } + }, + "range": [ + 101, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 82 + } + } + }, + "range": [ + 95, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 82 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 188, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 173, + 179 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "res", + "range": [ + 188, + 191 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "res", + "range": [ + 95, + 98 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "photos", + "range": [ + 173, + 179 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "photos", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "photo", + "identifiers": [ + { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "photos", + "range": [ + 436, + 442 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 14 + } + } + }, + "context": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "figure", + "range": [ + 456, + 462 + ], + "loc": { + "start": { + "line": 30, + "column": 3 + }, + "end": { + "line": 30, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 455, + 463 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 30, + "column": 10 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 463, + 467 + ], + "loc": { + "start": { + "line": 30, + "column": 10 + }, + "end": { + "line": 31, + "column": 3 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "img", + "range": [ + 468, + 471 + ], + "loc": { + "start": { + "line": 31, + "column": 4 + }, + "end": { + "line": 31, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "src", + "range": [ + 472, + 475 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 11 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "photo", + "range": [ + 477, + 482 + ], + "loc": { + "start": { + "line": 31, + "column": 13 + }, + "end": { + "line": 31, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "thumbnailUrl", + "range": [ + 483, + 495 + ], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 31, + "column": 31 + } + } + }, + "range": [ + 477, + 495 + ], + "loc": { + "start": { + "line": 31, + "column": 13 + }, + "end": { + "line": 31, + "column": 31 + } + } + }, + "range": [ + 476, + 496 + ], + "loc": { + "start": { + "line": 31, + "column": 12 + }, + "end": { + "line": 31, + "column": 32 + } + } + } + ], + "range": [ + 472, + 496 + ], + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 32 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "alt", + "range": [ + 497, + 500 + ], + "loc": { + "start": { + "line": 31, + "column": 33 + }, + "end": { + "line": 31, + "column": 36 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "photo", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 31, + "column": 38 + }, + "end": { + "line": 31, + "column": 43 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "title", + "range": [ + 508, + 513 + ], + "loc": { + "start": { + "line": 31, + "column": 44 + }, + "end": { + "line": 31, + "column": 49 + } + } + }, + "range": [ + 502, + 513 + ], + "loc": { + "start": { + "line": 31, + "column": 38 + }, + "end": { + "line": 31, + "column": 49 + } + } + }, + "range": [ + 501, + 514 + ], + "loc": { + "start": { + "line": 31, + "column": 37 + }, + "end": { + "line": 31, + "column": 50 + } + } + } + ], + "range": [ + 497, + 514 + ], + "loc": { + "start": { + "line": 31, + "column": 33 + }, + "end": { + "line": 31, + "column": 50 + } + } + } + ], + "selfClosing": false, + "range": [ + 467, + 515 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 51 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 467, + 515 + ], + "loc": { + "start": { + "line": 31, + "column": 3 + }, + "end": { + "line": 31, + "column": 51 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 515, + 519 + ], + "loc": { + "start": { + "line": 31, + "column": 51 + }, + "end": { + "line": 32, + "column": 3 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "figcaption", + "range": [ + 520, + 530 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 14 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 519, + 531 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 15 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "photo", + "range": [ + 532, + 537 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "title", + "range": [ + 538, + 543 + ], + "loc": { + "start": { + "line": 32, + "column": 22 + }, + "end": { + "line": 32, + "column": 27 + } + } + }, + "range": [ + 532, + 543 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 27 + } + } + }, + "range": [ + 531, + 544 + ], + "loc": { + "start": { + "line": 32, + "column": 15 + }, + "end": { + "line": 32, + "column": 28 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 544, + 557 + ], + "loc": { + "start": { + "line": 32, + "column": 28 + }, + "end": { + "line": 32, + "column": 41 + } + } + }, + "range": [ + 519, + 557 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 41 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 557, + 560 + ], + "loc": { + "start": { + "line": 32, + "column": 41 + }, + "end": { + "line": 33, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 560, + 569 + ], + "loc": { + "start": { + "line": 33, + "column": 2 + }, + "end": { + "line": 33, + "column": 11 + } + } + }, + "range": [ + 455, + 569 + ], + "loc": { + "start": { + "line": 30, + "column": 2 + }, + "end": { + "line": 33, + "column": 11 + } + } + } + ], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [ + { + "type": "SvelteHTMLComment", + "value": " this block renders when photos.length === 0 ", + "range": [ + 581, + 633 + ], + "loc": { + "start": { + "line": 35, + "column": 2 + }, + "end": { + "line": 35, + "column": 54 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 633, + 636 + ], + "loc": { + "start": { + "line": 35, + "column": 54 + }, + "end": { + "line": 36, + "column": 2 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 637, + 638 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 636, + 639 + ], + "loc": { + "start": { + "line": 36, + "column": 2 + }, + "end": { + "line": 36, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "loading...", + "range": [ + 639, + 649 + ], + "loc": { + "start": { + "line": 36, + "column": 5 + }, + "end": { + "line": 36, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 649, + 653 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 19 + } + } + }, + "range": [ + 636, + 653 + ], + "loc": { + "start": { + "line": 36, + "column": 2 + }, + "end": { + "line": 36, + "column": 19 + } + } + } + ], + "range": [ + 571, + 655 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 37, + "column": 1 + } + } + }, + "range": [ + 429, + 662 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 37, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "photo", + "range": [ + 477, + 482 + ], + "loc": { + "start": { + "line": 31, + "column": 13 + }, + "end": { + "line": 31, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photo", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 31, + "column": 38 + }, + "end": { + "line": 31, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photo", + "range": [ + 532, + 537 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "photo", + "range": [ + 477, + 482 + ], + "loc": { + "start": { + "line": 31, + "column": 13 + }, + "end": { + "line": 31, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photo", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 31, + "column": 38 + }, + "end": { + "line": 31, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "photo", + "range": [ + 532, + 537 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "photo", + "range": [ + 446, + 451 + ], + "loc": { + "start": { + "line": 29, + "column": 18 + }, + "end": { + "line": 29, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fetch", + "range": [ + 107, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json new file mode 100644 index 00000000..5495b9f4 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json @@ -0,0 +1,513 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Project", + "identifiers": [ + { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Project", + "range": [ + 417, + 424 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Project", + "range": [ + 711, + 718 + ], + "loc": { + "start": { + "line": 51, + "column": 3 + }, + "end": { + "line": 51, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "Comment", + "identifiers": [ + { + "type": "Identifier", + "name": "Comment", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Comment", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Comment", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Comment", + "range": [ + 535, + 542 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Comment", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Date", + "range": [ + 576, + 580 + ], + "loc": { + "start": { + "line": 44, + "column": 46 + }, + "end": { + "line": 44, + "column": 50 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Comment", + "range": [ + 535, + 542 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Comment", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Project", + "range": [ + 417, + 424 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Project", + "range": [ + 711, + 718 + ], + "loc": { + "start": { + "line": 51, + "column": 3 + }, + "end": { + "line": 51, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Project", + "range": [ + 17, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Date", + "range": [ + 576, + 580 + ], + "loc": { + "start": { + "line": 44, + "column": 46 + }, + "end": { + "line": 44, + "column": 50 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Date", + "range": [ + 576, + 580 + ], + "loc": { + "start": { + "line": 44, + "column": 46 + }, + "end": { + "line": 44, + "column": 50 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json new file mode 100644 index 00000000..9fa49c89 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json @@ -0,0 +1,990 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": null, + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 53 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 711, + 715 + ], + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "postedAt", + "identifiers": [ + { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "init": null, + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 741, + 749 + ], + "loc": { + "start": { + "line": 50, + "column": 19 + }, + "end": { + "line": 50, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 766, + 774 + ], + "loc": { + "start": { + "line": 50, + "column": 44 + }, + "end": { + "line": 50, + "column": 52 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ] + }, + { + "name": "avatar", + "identifiers": [ + { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "operator": "=", + "right": { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "/ /g", + "regex": { + "flags": "g", + "pattern": " " + }, + "value": "/ /g", + "range": [ + 112, + 116 + ], + "loc": { + "start": { + "line": 5, + "column": 62 + }, + "end": { + "line": 5, + "column": 66 + } + } + }, + { + "type": "Literal", + "raw": "'+'", + "value": "+", + "range": [ + 118, + 121 + ], + "loc": { + "start": { + "line": 5, + "column": 68 + }, + "end": { + "line": 5, + "column": 71 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "name", + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 53 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "replace", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 54 + }, + "end": { + "line": 5, + "column": 61 + } + } + }, + "range": [ + 99, + 111 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 61 + } + } + }, + "optional": false, + "range": [ + 99, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 72 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "https://ui-avatars.com/api/?name=", + "raw": "https://ui-avatars.com/api/?name=" + }, + "range": [ + 63, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 49 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "&rounded=true&background=ff3e00&color=fff&bold=true", + "raw": "&rounded=true&background=ff3e00&color=fff&bold=true" + }, + "range": [ + 122, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 72 + }, + "end": { + "line": 5, + "column": 125 + } + } + } + ], + "range": [ + 63, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 125 + } + } + }, + "range": [ + 54, + 175 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 125 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "avatar", + "range": [ + 640, + 646 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 99, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 53 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "avatar", + "range": [ + 640, + 646 + ], + "loc": { + "start": { + "line": 47, + "column": 12 + }, + "end": { + "line": 47, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "avatar", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 711, + 715 + ], + "loc": { + "start": { + "line": 49, + "column": 8 + }, + "end": { + "line": 49, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 741, + 749 + ], + "loc": { + "start": { + "line": 50, + "column": 19 + }, + "end": { + "line": 50, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 766, + 774 + ], + "loc": { + "start": { + "line": 50, + "column": 44 + }, + "end": { + "line": 50, + "column": 52 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "postedAt", + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json new file mode 100644 index 00000000..0ad83ba1 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json @@ -0,0 +1,992 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 758, + 765 + ], + "loc": { + "start": { + "line": 53, + "column": 31 + }, + "end": { + "line": 53, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 872, + 879 + ], + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "title", + "identifiers": [ + { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "init": null, + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 791, + 796 + ], + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "tasksCompleted", + "identifiers": [ + { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "range": [ + 40, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 30 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 809, + 823 + ], + "loc": { + "start": { + "line": 56, + "column": 6 + }, + "end": { + "line": 56, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + } + ] + }, + { + "name": "totalTasks", + "identifiers": [ + { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "range": [ + 72, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 826, + 836 + ], + "loc": { + "start": { + "line": 56, + "column": 23 + }, + "end": { + "line": 56, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 758, + 765 + ], + "loc": { + "start": { + "line": 53, + "column": 31 + }, + "end": { + "line": 53, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 791, + 796 + ], + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 21, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 809, + 823 + ], + "loc": { + "start": { + "line": 56, + "column": 6 + }, + "end": { + "line": 56, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tasksCompleted", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 826, + 836 + ], + "loc": { + "start": { + "line": 56, + "column": 23 + }, + "end": { + "line": 56, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "totalTasks", + "range": [ + 72, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 872, + 879 + ], + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 758, + 765 + ], + "loc": { + "start": { + "line": 53, + "column": 31 + }, + "end": { + "line": 53, + "column": 38 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$$slots", + "range": [ + 872, + 879 + ], + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json new file mode 100644 index 00000000..1975ce7d --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json @@ -0,0 +1,773 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 162, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 170, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 94, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + "range": [ + 94, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 19 + } + } + } + ], + "range": [ + 50, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [], + "range": [ + 27, + 108 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 138, + 149 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 138, + 149 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 162, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 170, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json new file mode 100644 index 00000000..314a82cd --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json @@ -0,0 +1,1192 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 42, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 150, + 155 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 204, + 209 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "doubled", + "identifiers": [ + { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 42, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 42, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 32, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 223, + 230 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 82, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 82, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "range": [ + 78, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "params": [], + "range": [ + 55, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 126, + 137 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 42, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 126, + 137 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 150, + 155 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 158, + 163 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 204, + 209 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 223, + 230 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 32, + 39 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json new file mode 100644 index 00000000..73bf0370 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json @@ -0,0 +1,1658 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 209, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 332, + 337 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 340, + 345 + ], + "loc": { + "start": { + "line": 19, + "column": 18 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "handleClick", + "identifiers": [ + { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 54, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 50, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + "params": [], + "range": [ + 27, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 308, + 319 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 209, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 308, + 319 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleClick", + "range": [ + 36, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 332, + 337 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 340, + 345 + ], + "loc": { + "start": { + "line": 19, + "column": 18 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 54, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 226, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 226, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 226, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 226, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json new file mode 100644 index 00000000..a153a661 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json @@ -0,0 +1,875 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "time", + "identifiers": [ + { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$time", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "formatter", + "identifiers": [ + { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'en'", + "value": "en", + "range": [ + 90, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 43 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "hour12", + "range": [ + 100, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 108, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 100, + 112 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "hour", + "range": [ + 116, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'numeric'", + "value": "numeric", + "range": [ + 122, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 116, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "minute", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'2-digit'", + "value": "2-digit", + "range": [ + 143, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + "range": [ + 135, + 152 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "second", + "range": [ + 156, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'2-digit'", + "value": "2-digit", + "range": [ + 164, + 173 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + "range": [ + 156, + 173 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 19 + } + } + } + ], + "range": [ + 96, + 176 + ], + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Intl", + "range": [ + 70, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "DateTimeFormat", + "range": [ + 75, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + "range": [ + 70, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 42 + } + } + }, + "range": [ + 66, + 177 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "range": [ + 54, + 177 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 9, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 207, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Intl", + "range": [ + 70, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "formatter", + "range": [ + 207, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "formatter", + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$time", + "range": [ + 224, + 229 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "time", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Intl", + "range": [ + 70, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Intl", + "range": [ + 70, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json new file mode 100644 index 00000000..7df7d267 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json @@ -0,0 +1,3049 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "questions", + "identifiers": [ + { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 32, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 32, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 39, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "Where did you go to school?", + "raw": "Where did you go to school?" + }, + "range": [ + 45, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 46 + } + } + } + ], + "range": [ + 45, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 46 + } + } + }, + "range": [ + 39, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 46 + } + } + } + ], + "range": [ + 30, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 48 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 82, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "range": [ + 82, + 87 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "What is your mother's name?", + "raw": "What is your mother's name?" + }, + "range": [ + 95, + 124 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + ], + "range": [ + 95, + 124 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 46 + } + } + }, + "range": [ + 89, + 124 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 46 + } + } + } + ], + "range": [ + 80, + 126 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 48 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 132, + 134 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "range": [ + 132, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 139, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "What is another personal fact that an attacker could easily find with Google?", + "raw": "What is another personal fact that an attacker could easily find with Google?" + }, + "range": [ + 145, + 224 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 96 + } + } + } + ], + "range": [ + 145, + 224 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 96 + } + } + }, + "range": [ + 139, + 224 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 96 + } + } + } + ], + "range": [ + 130, + 226 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 98 + } + } + } + ], + "range": [ + 26, + 229 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "range": [ + 14, + 229 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "questions", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 25, + "column": 9 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "selected", + "identifiers": [ + { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "init": null, + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 323, + 331 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 339, + 347 + ], + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 13, + "column": 53 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 564, + 572 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 845, + 853 + ], + "loc": { + "start": { + "line": 39, + "column": 22 + }, + "end": { + "line": 39, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 856, + 864 + ], + "loc": { + "start": { + "line": 39, + "column": 33 + }, + "end": { + "line": 39, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ] + }, + { + "name": "answer", + "identifiers": [ + { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 262, + 264 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "range": [ + 253, + 264 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 363, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 69 + }, + "end": { + "line": 13, + "column": 75 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 592, + 598 + ], + "loc": { + "start": { + "line": 24, + "column": 49 + }, + "end": { + "line": 24, + "column": 55 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 743, + 749 + ], + "loc": { + "start": { + "line": 32, + "column": 20 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 773, + 779 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 34, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + } + ] + }, + { + "name": "handleSubmit", + "identifiers": [ + { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 277, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 277, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "TemplateLiteral", + "expressions": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selected", + "range": [ + 323, + 331 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 332, + 334 + ], + "loc": { + "start": { + "line": 13, + "column": 38 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + "range": [ + 323, + 334 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selected", + "range": [ + 339, + 347 + ], + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 13, + "column": 53 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 348, + 352 + ], + "loc": { + "start": { + "line": 13, + "column": 54 + }, + "end": { + "line": 13, + "column": 58 + } + } + }, + "range": [ + 339, + 352 + ], + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 13, + "column": 58 + } + } + }, + { + "type": "Identifier", + "name": "answer", + "range": [ + 363, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 69 + }, + "end": { + "line": 13, + "column": 75 + } + } + } + ], + "quasis": [ + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": "answered question ", + "raw": "answered question " + }, + "range": [ + 302, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": " (", + "raw": " (" + }, + "range": [ + 334, + 339 + ], + "loc": { + "start": { + "line": 13, + "column": 40 + }, + "end": { + "line": 13, + "column": 45 + } + } + }, + { + "type": "TemplateElement", + "tail": false, + "value": { + "cooked": ") with \"", + "raw": ") with \"" + }, + "range": [ + 352, + 363 + ], + "loc": { + "start": { + "line": 13, + "column": 58 + }, + "end": { + "line": 13, + "column": 69 + } + } + }, + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "\"", + "raw": "\"" + }, + "range": [ + 369, + 372 + ], + "loc": { + "start": { + "line": 13, + "column": 75 + }, + "end": { + "line": 13, + "column": 78 + } + } + } + ], + "range": [ + 302, + 372 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 78 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 296, + 301 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 296, + 373 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 79 + } + } + }, + "range": [ + 296, + 374 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 80 + } + } + } + ], + "range": [ + 292, + 377 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 277, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 22 + } + } + }, + "params": [], + "range": [ + 268, + 377 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 528, + 540 + ], + "loc": { + "start": { + "line": 23, + "column": 32 + }, + "end": { + "line": 23, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 277, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 528, + 540 + ], + "loc": { + "start": { + "line": 23, + "column": 32 + }, + "end": { + "line": 23, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleSubmit", + "range": [ + 277, + 289 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 564, + 572 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "questions", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 25, + "column": 9 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "questions", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 743, + 749 + ], + "loc": { + "start": { + "line": 32, + "column": 20 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 773, + 779 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 34, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 845, + 853 + ], + "loc": { + "start": { + "line": 39, + "column": 22 + }, + "end": { + "line": 39, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 856, + 864 + ], + "loc": { + "start": { + "line": 39, + "column": 33 + }, + "end": { + "line": 39, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 296, + 301 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 323, + 331 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 339, + 347 + ], + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 13, + "column": 53 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 363, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 69 + }, + "end": { + "line": 13, + "column": 75 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 296, + 301 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 323, + 331 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 339, + 347 + ], + "loc": { + "start": { + "line": 13, + "column": 45 + }, + "end": { + "line": 13, + "column": 53 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 237, + 245 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 363, + 369 + ], + "loc": { + "start": { + "line": 13, + "column": 69 + }, + "end": { + "line": 13, + "column": 75 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 592, + 598 + ], + "loc": { + "start": { + "line": 24, + "column": 49 + }, + "end": { + "line": 24, + "column": 55 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "answer", + "range": [ + 592, + 598 + ], + "loc": { + "start": { + "line": 24, + "column": 49 + }, + "end": { + "line": 24, + "column": 55 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "answer", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "question", + "identifiers": [ + { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "questions", + "range": [ + 616, + 625 + ], + "loc": { + "start": { + "line": 25, + "column": 9 + }, + "end": { + "line": 25, + "column": 18 + } + } + }, + "context": { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "option", + "range": [ + 643, + 649 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "value", + "range": [ + 650, + 655 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "question", + "range": [ + 657, + 665 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "range": [ + 656, + 666 + ], + "loc": { + "start": { + "line": 26, + "column": 17 + }, + "end": { + "line": 26, + "column": 27 + } + } + } + ], + "range": [ + 650, + 666 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 27 + } + } + } + ], + "selfClosing": false, + "range": [ + 642, + 667 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 28 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 667, + 672 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 27, + "column": 4 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "question", + "range": [ + 673, + 681 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 682, + 686 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "range": [ + 673, + 686 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 18 + } + } + }, + "range": [ + 672, + 687 + ], + "loc": { + "start": { + "line": 27, + "column": 4 + }, + "end": { + "line": 27, + "column": 19 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 687, + 691 + ], + "loc": { + "start": { + "line": 27, + "column": 19 + }, + "end": { + "line": 28, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 691, + 700 + ], + "loc": { + "start": { + "line": 28, + "column": 3 + }, + "end": { + "line": 28, + "column": 12 + } + } + }, + "range": [ + 642, + 700 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 28, + "column": 12 + } + } + } + ], + "else": null, + "range": [ + 609, + 710 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 29, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "question", + "range": [ + 657, + 665 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "question", + "range": [ + 673, + 681 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "question", + "range": [ + 657, + 665 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "question", + "range": [ + 673, + 681 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "question", + "range": [ + 629, + 637 + ], + "loc": { + "start": { + "line": 25, + "column": 22 + }, + "end": { + "line": 25, + "column": 30 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 296, + 301 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 296, + 301 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json new file mode 100644 index 00000000..8aea8a11 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json @@ -0,0 +1,519 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "AudioPlayer", + "identifiers": [ + { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 134, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 358, + 369 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 589, + 600 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 821, + 832 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 1089, + 1100 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 134, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 358, + 369 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 589, + 600 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 821, + 832 + ], + "loc": { + "start": { + "line": 30, + "column": 1 + }, + "end": { + "line": 30, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 1089, + 1100 + ], + "loc": { + "start": { + "line": 38, + "column": 1 + }, + "end": { + "line": 38, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "AudioPlayer", + "range": [ + 17, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json new file mode 100644 index 00000000..c730ce47 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json @@ -0,0 +1,2635 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "current", + "identifiers": [ + { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "init": null, + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 236, + 243 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "src", + "identifiers": [ + { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "init": null, + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 657, + 660 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ] + }, + { + "name": "title", + "identifiers": [ + { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "init": null, + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + } + ] + }, + { + "name": "composer", + "identifiers": [ + { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "init": null, + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "composer", + "range": [ + 527, + 535 + ], + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + } + ] + }, + { + "name": "performer", + "identifiers": [ + { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "init": null, + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "performer", + "range": [ + 562, + 571 + ], + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 57 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + } + } + ] + }, + { + "name": "audio", + "identifiers": [ + { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + "init": null, + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 15, + "column": 29 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 599, + 604 + ], + "loc": { + "start": { + "line": 32, + "column": 13 + }, + "end": { + "line": 32, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + } + ] + }, + { + "name": "paused", + "identifiers": [ + { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 168, + 172 + ], + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + "range": [ + 159, + 172 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 487, + 493 + ], + "loc": { + "start": { + "line": 27, + "column": 25 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 613, + 619 + ], + "loc": { + "start": { + "line": 33, + "column": 7 + }, + "end": { + "line": 33, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + } + ] + }, + { + "name": "stopOthers", + "identifiers": [ + { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 185, + 195 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 185, + 195 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "current", + "range": [ + 236, + 243 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pause", + "range": [ + 244, + 249 + ], + "loc": { + "start": { + "line": 15, + "column": 44 + }, + "end": { + "line": 15, + "column": 49 + } + } + }, + "range": [ + 236, + 249 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 49 + } + } + }, + "optional": false, + "range": [ + 236, + 251 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 51 + } + } + }, + "range": [ + 236, + 252 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 52 + } + } + }, + "test": { + "type": "LogicalExpression", + "left": { + "type": "Identifier", + "name": "current", + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + "operator": "!==", + "right": { + "type": "Identifier", + "name": "audio", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 15, + "column": 29 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + "range": [ + 217, + 234 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + "range": [ + 206, + 234 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + "range": [ + 202, + 252 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 52 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "current", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "audio", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "range": [ + 255, + 270 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "range": [ + 255, + 271 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 18 + } + } + } + ], + "range": [ + 198, + 274 + ], + "loc": { + "start": { + "line": 14, + "column": 23 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 185, + 195 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + "params": [], + "range": [ + 176, + 274 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 17, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 631, + 641 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 185, + 195 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 487, + 493 + ], + "loc": { + "start": { + "line": 27, + "column": 25 + }, + "end": { + "line": 27, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "title", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "title", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "composer", + "range": [ + 527, + 535 + ], + "loc": { + "start": { + "line": 29, + "column": 13 + }, + "end": { + "line": 29, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "composer", + "range": [ + 108, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "performer", + "range": [ + 562, + 571 + ], + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 57 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "performer", + "range": [ + 130, + 139 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 599, + 604 + ], + "loc": { + "start": { + "line": 32, + "column": 13 + }, + "end": { + "line": 32, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "paused", + "range": [ + 613, + 619 + ], + "loc": { + "start": { + "line": 33, + "column": 7 + }, + "end": { + "line": 33, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "paused", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 631, + 641 + ], + "loc": { + "start": { + "line": 34, + "column": 11 + }, + "end": { + "line": 34, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "stopOthers", + "range": [ + 185, + 195 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "src", + "range": [ + 657, + 660 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "src", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 15, + "column": 29 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 236, + 243 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 15, + "column": 29 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 236, + 243 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 43 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "current", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "current", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "audio", + "range": [ + 265, + 270 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "audio", + "range": [ + 147, + 152 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 10 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json new file mode 100644 index 00000000..d42ad87c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json @@ -0,0 +1,279 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Box", + "identifiers": [ + { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 132, + 135 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 132, + 135 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json new file mode 100644 index 00000000..a1c47e26 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json @@ -0,0 +1,1041 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Hoverable", + "identifiers": [ + { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "active", + "identifiers": [ + { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "hovering", + "range": [ + 231, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "modifiers": [], + "range": [ + 227, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "expression": { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + "range": [ + 227, + 248 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 32 + } + } + } + ], + "selfClosing": false, + "range": [ + 216, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 249, + 251 + ], + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 19, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 252, + 255 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Class", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "active", + "range": [ + 262, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "modifiers": [], + "range": [ + 256, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "expression": { + "type": "Identifier", + "name": "active", + "range": [ + 262, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "shorthand": true, + "range": [ + 256, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 18 + } + } + } + ], + "selfClosing": false, + "range": [ + 251, + 269 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 19 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 269, + 272 + ], + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + { + "type": "SvelteIfBlock", + "elseif": false, + "expression": { + "type": "Identifier", + "name": "active", + "range": [ + 277, + 283 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 13 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 289, + 290 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 288, + 291 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "I am being hovered upon.", + "range": [ + 291, + 315 + ], + "loc": { + "start": { + "line": 21, + "column": 6 + }, + "end": { + "line": 21, + "column": 30 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 315, + 319 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 34 + } + } + }, + "range": [ + 288, + 319 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 34 + } + } + } + ], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 333, + 336 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "Hover over me!", + "range": [ + 336, + 350 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 20 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 23, + "column": 20 + }, + "end": { + "line": 23, + "column": 24 + } + } + }, + "range": [ + 333, + 354 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 24 + } + } + } + ], + "range": [ + 322, + 357 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "range": [ + 272, + 362 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 24, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 362, + 364 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 25, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 364, + 370 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + "range": [ + 251, + 370 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 370, + 371 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 26, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 371, + 383 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "range": [ + 216, + 383 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 26, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 262, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 277, + 283 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 262, + 268 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "active", + "range": [ + 277, + 283 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "active", + "range": [ + 241, + 247 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 31 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json new file mode 100644 index 00000000..dbcfec92 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json @@ -0,0 +1,989 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "hovering", + "identifiers": [ + { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "init": null, + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 90, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 189, + 197 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "enter", + "identifiers": [ + { + "type": "Identifier", + "name": "enter", + "range": [ + 35, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "enter", + "range": [ + 35, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "hovering", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 58, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "range": [ + 47, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "range": [ + 47, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 43, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "enter", + "range": [ + 35, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [], + "range": [ + 26, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "enter", + "range": [ + 142, + 147 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "enter", + "range": [ + 35, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + }, + { + "name": "leave", + "identifiers": [ + { + "type": "Identifier", + "name": "leave", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "leave", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "hovering", + "range": [ + 90, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 101, + 106 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "range": [ + 90, + 106 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "range": [ + 90, + 107 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 19 + } + } + } + ], + "range": [ + 86, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "leave", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "params": [], + "range": [ + 69, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "leave", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 13, + "column": 42 + }, + "end": { + "line": 13, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "leave", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "enter", + "range": [ + 142, + 147 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "enter", + "range": [ + 35, + 40 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "leave", + "range": [ + 164, + 169 + ], + "loc": { + "start": { + "line": 13, + "column": 42 + }, + "end": { + "line": 13, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "leave", + "range": [ + 78, + 83 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 189, + 197 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 90, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 90, + 98 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 14, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json new file mode 100644 index 00000000..569c1948 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json @@ -0,0 +1,1041 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Hoverable", + "identifiers": [ + { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 17, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "hovering", + "identifiers": [ + { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "node": { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Hoverable", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Let", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "hovering", + "range": [ + 231, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "modifiers": [], + "range": [ + 227, + 239 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "expression": { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "range": [ + 227, + 250 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 216, + 251 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 251, + 253 + ], + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 19, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 254, + 257 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Class", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "active", + "range": [ + 264, + 270 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "modifiers": [], + "range": [ + 258, + 270 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + "expression": { + "type": "Identifier", + "name": "hovering", + "range": [ + 272, + 280 + ], + "loc": { + "start": { + "line": 19, + "column": 20 + }, + "end": { + "line": 19, + "column": 28 + } + } + }, + "shorthand": false, + "range": [ + 258, + 281 + ], + "loc": { + "start": { + "line": 19, + "column": 6 + }, + "end": { + "line": 19, + "column": 29 + } + } + } + ], + "selfClosing": false, + "range": [ + 253, + 282 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 282, + 285 + ], + "loc": { + "start": { + "line": 19, + "column": 30 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + { + "type": "SvelteIfBlock", + "elseif": false, + "expression": { + "type": "Identifier", + "name": "hovering", + "range": [ + 290, + 298 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 21, + "column": 4 + }, + "end": { + "line": 21, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 303, + 306 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "I am being hovered upon.", + "range": [ + 306, + 330 + ], + "loc": { + "start": { + "line": 21, + "column": 6 + }, + "end": { + "line": 21, + "column": 30 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 330, + 334 + ], + "loc": { + "start": { + "line": 21, + "column": 30 + }, + "end": { + "line": 21, + "column": 34 + } + } + }, + "range": [ + 303, + 334 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 34 + } + } + } + ], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 349, + 350 + ], + "loc": { + "start": { + "line": 23, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 348, + 351 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "Hover over me!", + "range": [ + 351, + 365 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 20 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 365, + 369 + ], + "loc": { + "start": { + "line": 23, + "column": 20 + }, + "end": { + "line": 23, + "column": 24 + } + } + }, + "range": [ + 348, + 369 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 24 + } + } + } + ], + "range": [ + 337, + 372 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "range": [ + 285, + 377 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 24, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 377, + 379 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 25, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 379, + 385 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + "range": [ + 253, + 385 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 385, + 386 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 26, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 386, + 398 + ], + "loc": { + "start": { + "line": 26, + "column": 0 + }, + "end": { + "line": 26, + "column": 12 + } + } + }, + "range": [ + 216, + 398 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 26, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 272, + 280 + ], + "loc": { + "start": { + "line": 19, + "column": 20 + }, + "end": { + "line": 19, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 290, + 298 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 272, + 280 + ], + "loc": { + "start": { + "line": 19, + "column": 20 + }, + "end": { + "line": 19, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hovering", + "range": [ + 290, + 298 + ], + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hovering", + "range": [ + 241, + 249 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 33 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json new file mode 100644 index 00000000..0f871208 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Box", + "identifiers": [ + { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json new file mode 100644 index 00000000..deed7fcd --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json @@ -0,0 +1,933 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Info", + "identifiers": [ + { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Info", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "pkg", + "identifiers": [ + { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'svelte'", + "value": "svelte", + "range": [ + 68, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "range": [ + 62, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "version", + "range": [ + 80, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 80, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'blazing'", + "value": "blazing", + "range": [ + 101, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 94, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "website", + "range": [ + 114, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'https://svelte.dev'", + "value": "https://svelte.dev", + "range": [ + 123, + 143 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + "range": [ + 114, + 143 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 31 + } + } + } + ], + "range": [ + 58, + 146 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "range": [ + 52, + 146 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 190, + 193 + ], + "loc": { + "start": { + "line": 12, + "column": 31 + }, + "end": { + "line": 12, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 210, + 213 + ], + "loc": { + "start": { + "line": 12, + "column": 51 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 230, + 233 + ], + "loc": { + "start": { + "line": 12, + "column": 71 + }, + "end": { + "line": 12, + "column": 74 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 190, + 193 + ], + "loc": { + "start": { + "line": 12, + "column": 31 + }, + "end": { + "line": 12, + "column": 34 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 210, + 213 + ], + "loc": { + "start": { + "line": 12, + "column": 51 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 230, + 233 + ], + "loc": { + "start": { + "line": 12, + "column": 71 + }, + "end": { + "line": 12, + "column": 74 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Info", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json new file mode 100644 index 00000000..618f808d --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json @@ -0,0 +1,932 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": null, + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 115, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 10, + "column": 73 + }, + "end": { + "line": 10, + "column": 77 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "version", + "identifiers": [ + { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "init": null, + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "version", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ] + }, + { + "name": "speed", + "identifiers": [ + { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "init": null, + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 140, + 145 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ] + }, + { + "name": "website", + "identifiers": [ + { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "init": null, + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "website", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 115, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "speed", + "range": [ + 140, + 145 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "speed", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "version", + "range": [ + 172, + 179 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "version", + "range": [ + 39, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 226, + 230 + ], + "loc": { + "start": { + "line": 10, + "column": 73 + }, + "end": { + "line": 10, + "column": 77 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "website", + "range": [ + 255, + 262 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "website", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 19 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json new file mode 100644 index 00000000..21f1f680 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json @@ -0,0 +1,693 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Info", + "identifiers": [ + { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Info", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "pkg", + "identifiers": [ + { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "init": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'svelte'", + "value": "svelte", + "range": [ + 68, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "range": [ + 62, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "version", + "range": [ + 80, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + "range": [ + 80, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "speed", + "range": [ + 94, + 99 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'blazing'", + "value": "blazing", + "range": [ + 101, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 94, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "website", + "range": [ + 114, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'https://svelte.dev'", + "value": "https://svelte.dev", + "range": [ + 123, + 143 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + "range": [ + 114, + 143 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 31 + } + } + } + ], + "range": [ + 58, + 146 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "range": [ + 52, + 146 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 169, + 172 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "pkg", + "range": [ + 169, + 172 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "pkg", + "range": [ + 52, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Info", + "range": [ + 160, + 164 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Info", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json new file mode 100644 index 00000000..c39f7097 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json @@ -0,0 +1,2508 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "spring", + "identifiers": [ + { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "local": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "spring", + "range": [ + 65, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "spring", + "range": [ + 143, + 149 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "coords", + "identifiers": [ + { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 77, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + "range": [ + 81, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 30 + }, + "end": { + "line": 4, + "column": 35 + } + } + } + ], + "range": [ + 72, + 88 + ], + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 37 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "stiffness", + "range": [ + 94, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0.1", + "value": 0.1, + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "range": [ + 94, + 108 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "damping", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "0.25", + "value": 0.25, + "range": [ + 121, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 112, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "range": [ + 90, + 128 + ], + "loc": { + "start": { + "line": 4, + "column": 39 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "spring", + "range": [ + 65, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 65, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "range": [ + 56, + 129 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 333, + 339 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 378, + 384 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 474, + 480 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 517, + 523 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 619, + 625 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 751, + 758 + ], + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 766, + 773 + ], + "loc": { + "start": { + "line": 33, + "column": 28 + }, + "end": { + "line": 33, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 766, + 773 + ], + "loc": { + "start": { + "line": 33, + "column": 28 + }, + "end": { + "line": 33, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + }, + { + "name": "size", + "identifiers": [ + { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "10", + "value": 10, + "range": [ + 150, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "spring", + "range": [ + 143, + 149 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "optional": false, + "range": [ + 143, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + "range": [ + 136, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 686, + 690 + ], + "loc": { + "start": { + "line": 30, + "column": 22 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 721, + 725 + ], + "loc": { + "start": { + "line": 31, + "column": 20 + }, + "end": { + "line": 31, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$size", + "range": [ + 780, + 785 + ], + "loc": { + "start": { + "line": 33, + "column": 42 + }, + "end": { + "line": 33, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "spring", + "range": [ + 65, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "spring", + "range": [ + 143, + 149 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "spring", + "range": [ + 19, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 333, + 339 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 378, + 384 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 474, + 480 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 517, + 523 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 751, + 758 + ], + "loc": { + "start": { + "line": 33, + "column": 13 + }, + "end": { + "line": 33, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$coords", + "range": [ + 766, + 773 + ], + "loc": { + "start": { + "line": 33, + "column": 28 + }, + "end": { + "line": 33, + "column": 35 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$size", + "range": [ + 780, + 785 + ], + "loc": { + "start": { + "line": 33, + "column": 42 + }, + "end": { + "line": 33, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "x", + "range": [ + 632, + 633 + ], + "loc": { + "start": { + "line": 29, + "column": 34 + }, + "end": { + "line": 29, + "column": 35 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 635, + 636 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 38 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientX", + "range": [ + 637, + 644 + ], + "loc": { + "start": { + "line": 29, + "column": 39 + }, + "end": { + "line": 29, + "column": 46 + } + } + }, + "range": [ + 635, + 644 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 46 + } + } + }, + "range": [ + 632, + 644 + ], + "loc": { + "start": { + "line": 29, + "column": 34 + }, + "end": { + "line": 29, + "column": 46 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "y", + "range": [ + 646, + 647 + ], + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 49 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "e", + "range": [ + 649, + 650 + ], + "loc": { + "start": { + "line": 29, + "column": 51 + }, + "end": { + "line": 29, + "column": 52 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "clientY", + "range": [ + 651, + 658 + ], + "loc": { + "start": { + "line": 29, + "column": 53 + }, + "end": { + "line": 29, + "column": 60 + } + } + }, + "range": [ + 649, + 658 + ], + "loc": { + "start": { + "line": 29, + "column": 51 + }, + "end": { + "line": 29, + "column": 60 + } + } + }, + "range": [ + 646, + 658 + ], + "loc": { + "start": { + "line": 29, + "column": 48 + }, + "end": { + "line": 29, + "column": 60 + } + } + } + ], + "range": [ + 630, + 660 + ], + "loc": { + "start": { + "line": 29, + "column": 32 + }, + "end": { + "line": 29, + "column": 62 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "coords", + "range": [ + 619, + 625 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 27 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "set", + "range": [ + 626, + 629 + ], + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 31 + } + } + }, + "range": [ + 619, + 629 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 619, + 661 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + } + ], + "range": [ + 614, + 661 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 63 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 635, + 636 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 649, + 650 + ], + "loc": { + "start": { + "line": 29, + "column": 51 + }, + "end": { + "line": 29, + "column": 52 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 619, + 625 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 635, + 636 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "e", + "range": [ + 649, + 650 + ], + "loc": { + "start": { + "line": 29, + "column": 51 + }, + "end": { + "line": 29, + "column": 52 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "e", + "range": [ + 614, + 615 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "coords", + "range": [ + 619, + 625 + ], + "loc": { + "start": { + "line": 29, + "column": 21 + }, + "end": { + "line": 29, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "coords", + "range": [ + 56, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 686, + 690 + ], + "loc": { + "start": { + "line": 30, + "column": 22 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 686, + 690 + ], + "loc": { + "start": { + "line": 30, + "column": 22 + }, + "end": { + "line": 30, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 721, + 725 + ], + "loc": { + "start": { + "line": 31, + "column": 20 + }, + "end": { + "line": 31, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "size", + "range": [ + 721, + 725 + ], + "loc": { + "start": { + "line": 31, + "column": 20 + }, + "end": { + "line": 31, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "size", + "range": [ + 136, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json new file mode 100644 index 00000000..9bb07114 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json @@ -0,0 +1,1197 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "hereKitty", + "identifiers": [ + { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 26, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 14, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 116, + 125 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 621, + 630 + ], + "loc": { + "start": { + "line": 34, + "column": 16 + }, + "end": { + "line": 34, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "handleMouseenter", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 78, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 4, + "column": 48 + } + } + }, + "range": [ + 66, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 48 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 60, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 48 + } + } + }, + "range": [ + 41, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 48 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 465, + 481 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + } + ] + }, + { + "name": "handleMouseleave", + "identifiers": [ + { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 116, + 125 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 128, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 44 + }, + "end": { + "line": 5, + "column": 49 + } + } + }, + "range": [ + 116, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 49 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 110, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 49 + } + } + }, + "range": [ + 91, + 133 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 49 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 499, + 515 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 465, + 481 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseenter", + "range": [ + 41, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 499, + 515 + ], + "loc": { + "start": { + "line": 29, + "column": 16 + }, + "end": { + "line": 29, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleMouseleave", + "range": [ + 91, + 107 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 621, + 630 + ], + "loc": { + "start": { + "line": 34, + "column": 16 + }, + "end": { + "line": 34, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 66, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 116, + 125 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 116, + 125 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 41 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "hereKitty", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json new file mode 100644 index 00000000..a3748aef --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json @@ -0,0 +1,2146 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "RedThing", + "identifiers": [ + { + "type": "Identifier", + "name": "RedThing", + "range": [ + 17, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 17, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 17, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 17, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 195, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 17, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "GreenThing", + "identifiers": [ + { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 240, + 250 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ] + }, + { + "name": "BlueThing", + "identifiers": [ + { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 285, + 294 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + } + ] + }, + { + "name": "options", + "identifiers": [ + { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 168, + 173 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'red'", + "value": "red", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "range": [ + 168, + 180 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "component", + "range": [ + 184, + 193 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 29 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 195, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "range": [ + 184, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 39 + } + } + } + ], + "range": [ + 166, + 207 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 43 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 213, + 218 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'green'", + "value": "green", + "range": [ + 220, + 227 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "range": [ + 213, + 227 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "component", + "range": [ + 229, + 238 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 29 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 240, + 250 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "range": [ + 229, + 250 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 41 + } + } + } + ], + "range": [ + 211, + 252 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 43 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "color", + "range": [ + 258, + 263 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'blue'", + "value": "blue", + "range": [ + 265, + 271 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "range": [ + 258, + 271 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "component", + "range": [ + 274, + 283 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 285, + 294 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 274, + 294 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + ], + "range": [ + 256, + 297 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 43 + } + } + } + ], + "range": [ + 162, + 301 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "range": [ + 152, + 301 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 320, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 382, + 389 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + } + ] + }, + { + "name": "selected", + "identifiers": [ + { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "options", + "range": [ + 320, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 328, + 329 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "range": [ + 320, + 330 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "range": [ + 309, + 330 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 363, + 371 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 494, + 502 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 195, + 203 + ], + "loc": { + "start": { + "line": 7, + "column": 31 + }, + "end": { + "line": 7, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "RedThing", + "range": [ + 17, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 240, + 250 + ], + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "GreenThing", + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 285, + 294 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "BlueThing", + "range": [ + 107, + 116 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 320, + 327 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 363, + 371 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 382, + 389 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 494, + 502 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 309, + 317 + ], + "loc": { + "start": { + "line": 12, + "column": 5 + }, + "end": { + "line": 12, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "option", + "identifiers": [ + { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "options", + "range": [ + 382, + 389 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "context": { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "option", + "range": [ + 404, + 410 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "value", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "option", + "range": [ + 418, + 424 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "range": [ + 417, + 425 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 24 + } + } + } + ], + "range": [ + 411, + 425 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 24 + } + } + } + ], + "selfClosing": false, + "range": [ + 403, + 426 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "option", + "range": [ + 427, + 433 + ], + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "color", + "range": [ + 434, + 439 + ], + "loc": { + "start": { + "line": 17, + "column": 33 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + "range": [ + 427, + 439 + ], + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 38 + } + } + }, + "range": [ + 426, + 440 + ], + "loc": { + "start": { + "line": 17, + "column": 25 + }, + "end": { + "line": 17, + "column": 39 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 440, + 449 + ], + "loc": { + "start": { + "line": 17, + "column": 39 + }, + "end": { + "line": 17, + "column": 48 + } + } + }, + "range": [ + 403, + 449 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 48 + } + } + } + ], + "else": null, + "range": [ + 375, + 458 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 18, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 418, + 424 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 427, + 433 + ], + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 418, + 424 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 427, + 433 + ], + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 393, + 399 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 25 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json new file mode 100644 index 00000000..8e6c9ce7 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json @@ -0,0 +1,1115 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "selection", + "identifiers": [ + { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 26, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 14, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "handleSelectionChange", + "identifiers": [ + { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "init": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "selection", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "document", + "range": [ + 81, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 58 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getSelection", + "range": [ + 90, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 59 + }, + "end": { + "line": 4, + "column": 71 + } + } + }, + "range": [ + 81, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 71 + } + } + }, + "optional": false, + "range": [ + 81, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 73 + } + } + }, + "range": [ + 69, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + ], + "range": [ + 62, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 73 + } + } + }, + "range": [ + 38, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 73 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 154, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 37 + }, + "end": { + "line": 7, + "column": 58 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 154, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 37 + }, + "end": { + "line": 7, + "column": 58 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleSelectionChange", + "range": [ + 38, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "e", + "identifiers": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "e", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "selection", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "document", + "range": [ + 81, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 58 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getSelection", + "range": [ + 90, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 59 + }, + "end": { + "line": 4, + "column": 71 + } + } + }, + "range": [ + 81, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 71 + } + } + }, + "optional": false, + "range": [ + 81, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 73 + } + } + }, + "range": [ + 69, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 73 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "e", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + ], + "range": [ + 62, + 104 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 73 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 81, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 58 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 38 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 14, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 81, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 58 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 81, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 58 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "document", + "range": [ + 81, + 89 + ], + "loc": { + "start": { + "line": 4, + "column": 50 + }, + "end": { + "line": 4, + "column": 58 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json new file mode 100644 index 00000000..1ffb9b82 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json @@ -0,0 +1,1355 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "options", + "identifiers": [ + { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "'h1'", + "value": "h1", + "range": [ + 27, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Literal", + "raw": "'h3'", + "value": "h3", + "range": [ + 33, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "Literal", + "raw": "'p'", + "value": "p", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 33 + } + } + } + ], + "range": [ + 26, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 16, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 123, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "selected", + "identifiers": [ + { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": true, + "object": { + "type": "Identifier", + "name": "options", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + "range": [ + 61, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "range": [ + 50, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 104, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 244, + 252 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 61, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 104, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "options", + "range": [ + 123, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "options", + "range": [ + 16, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 244, + 252 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selected", + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 22 + }, + "end": { + "line": 12, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selected", + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "option", + "identifiers": [ + { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "options", + "range": [ + 123, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "context": { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "option", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "value", + "range": [ + 152, + 157 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "option", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "range": [ + 158, + 166 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + ], + "range": [ + 152, + 166 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 24 + } + } + } + ], + "selfClosing": false, + "range": [ + 144, + 167 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "option", + "range": [ + 168, + 174 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + "range": [ + 167, + 175 + ], + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 33 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 175, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 33 + }, + "end": { + "line": 8, + "column": 42 + } + } + }, + "range": [ + 144, + 184 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 42 + } + } + } + ], + "else": null, + "range": [ + 116, + 193 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 168, + 174 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 159, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "option", + "range": [ + 168, + 174 + ], + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "option", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json new file mode 100644 index 00000000..07f410db --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json @@ -0,0 +1,199 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Box", + "identifiers": [ + { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Box", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Box", + "range": [ + 17, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json new file mode 100644 index 00000000..d392ca4b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json @@ -0,0 +1,34 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json new file mode 100644 index 00000000..aa5d1b86 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json @@ -0,0 +1,4850 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Todo", + "identifiers": [ + { + "type": "Identifier", + "name": "Todo", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Todo", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Todo", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Todo", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Todo", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "todos", + "identifiers": [ + { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 64, + 66 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "range": [ + 64, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 71, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 77, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 71, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 83, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'wash the car'", + "value": "wash the car", + "range": [ + 89, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 43 + } + } + }, + "range": [ + 83, + 103 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 43 + } + } + } + ], + "range": [ + 62, + 105 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 45 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 111, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "range": [ + 111, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 124, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + "range": [ + 118, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'take the dog for a walk'", + "value": "take the dog for a walk", + "range": [ + 137, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + "range": [ + 131, + 162 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 55 + } + } + } + ], + "range": [ + 109, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 57 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 170, + 172 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "range": [ + 170, + 175 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 177, + 181 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + "range": [ + 177, + 188 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 190, + 194 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'mow the lawn'", + "value": "mow the lawn", + "range": [ + 196, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + "range": [ + 190, + 210 + ], + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 44 + } + } + } + ], + "range": [ + 168, + 212 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 46 + } + } + } + ], + "range": [ + 58, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "range": [ + 50, + 215 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "name": "toggle", + "identifiers": [ + { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 348, + 350 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 357, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 348, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 372, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "range": [ + 372, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "range": [ + 366, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 388, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 395, + 399 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 400, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 395, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 394, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 388, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + ], + "range": [ + 341, + 410 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 334, + 411 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 18, + "column": 6 + } + } + } + ], + "range": [ + 301, + 416 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "todo", + "range": [ + 283, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "operator": "===", + "right": { + "type": "Identifier", + "name": "toggled", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "range": [ + 283, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "range": [ + 279, + 416 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "todo", + "range": [ + 457, + 461 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "range": [ + 450, + 462 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 15 + } + } + } + ], + "range": [ + 274, + 466 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + ], + "range": [ + 266, + 466 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 23, + "column": 3 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "map", + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "range": [ + 256, + 265 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 256, + 467 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + "range": [ + 248, + 467 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + "range": [ + 248, + 468 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 23, + "column": 5 + } + } + } + ], + "range": [ + 244, + 471 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + ], + "range": [ + 219, + 471 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 550, + 556 + ], + "loc": { + "start": { + "line": 29, + "column": 30 + }, + "end": { + "line": 29, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "toggled", + "identifiers": [ + { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 348, + 350 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 357, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 348, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 372, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "range": [ + 372, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "range": [ + 366, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 388, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 395, + 399 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 400, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 395, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 394, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 388, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + ], + "range": [ + 341, + 410 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 334, + 411 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 18, + "column": 6 + } + } + } + ], + "range": [ + 301, + 416 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "todo", + "range": [ + 283, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "operator": "===", + "right": { + "type": "Identifier", + "name": "toggled", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "range": [ + 283, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "range": [ + 279, + 416 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "todo", + "range": [ + 457, + 461 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "range": [ + 450, + 462 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 15 + } + } + } + ], + "range": [ + 274, + 466 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + ], + "range": [ + 266, + 466 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 23, + "column": 3 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "map", + "range": [ + 262, + 265 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "range": [ + 256, + 265 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 256, + 467 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + "range": [ + 248, + 467 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 23, + "column": 4 + } + } + }, + "range": [ + 248, + 468 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 23, + "column": 5 + } + } + } + ], + "range": [ + 244, + 471 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + ], + "range": [ + 219, + 471 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggled", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "id", + "range": [ + 348, + 350 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "id", + "range": [ + 357, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 352, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 348, + 359 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 372, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 377, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "range": [ + 372, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + "range": [ + 366, + 381 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 388, + 392 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 395, + 399 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 400, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 395, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 394, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 21 + } + } + }, + "range": [ + 388, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 21 + } + } + } + ], + "range": [ + 341, + 410 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 18, + "column": 5 + } + } + }, + "range": [ + 334, + 411 + ], + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 18, + "column": 6 + } + } + } + ], + "range": [ + 301, + 416 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "todo", + "range": [ + 283, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "operator": "===", + "right": { + "type": "Identifier", + "name": "toggled", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "range": [ + 283, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "range": [ + 279, + 416 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "todo", + "range": [ + 457, + 461 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "range": [ + 450, + 462 + ], + "loc": { + "start": { + "line": 22, + "column": 3 + }, + "end": { + "line": 22, + "column": 15 + } + } + } + ], + "range": [ + 274, + 466 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + ], + "range": [ + 266, + 466 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 23, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 283, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 372, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 395, + 399 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 457, + 461 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 283, + 287 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "toggled", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 457, + 461 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 372, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 395, + 399 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 352, + 356 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 372, + 376 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 395, + 399 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 24 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggled", + "range": [ + 292, + 299 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggled", + "range": [ + 235, + 242 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [ + 50, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "todos", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 28, + "column": 7 + }, + "end": { + "line": 28, + "column": 12 + } + } + }, + "context": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "Todo", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteShorthandAttribute", + "key": { + "type": "Identifier", + "name": "todo", + "range": [ + 528, + 532 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "value": { + "type": "Identifier", + "name": "todo", + "range": [ + 528, + 532 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "range": [ + 527, + 533 + ], + "loc": { + "start": { + "line": 29, + "column": 7 + }, + "end": { + "line": 29, + "column": 13 + } + } + }, + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 537, + 542 + ], + "loc": { + "start": { + "line": 29, + "column": 17 + }, + "end": { + "line": 29, + "column": 22 + } + } + }, + "modifiers": [], + "range": [ + 534, + 542 + ], + "loc": { + "start": { + "line": 29, + "column": 14 + }, + "end": { + "line": 29, + "column": 22 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 557, + 561 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 41 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "toggle", + "range": [ + 550, + 556 + ], + "loc": { + "start": { + "line": 29, + "column": 30 + }, + "end": { + "line": 29, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 550, + 562 + ], + "loc": { + "start": { + "line": 29, + "column": 30 + }, + "end": { + "line": 29, + "column": 42 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 544, + 562 + ], + "loc": { + "start": { + "line": 29, + "column": 24 + }, + "end": { + "line": 29, + "column": 42 + } + } + }, + "range": [ + 534, + 563 + ], + "loc": { + "start": { + "line": 29, + "column": 14 + }, + "end": { + "line": 29, + "column": 43 + } + } + } + ], + "selfClosing": true, + "range": [ + 521, + 565 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 45 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 521, + 565 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 45 + } + } + } + ], + "else": null, + "range": [ + 498, + 573 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 30, + "column": 7 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 528, + 532 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 557, + 561 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 528, + 532 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Todo", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Todo", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 550, + 556 + ], + "loc": { + "start": { + "line": 29, + "column": 30 + }, + "end": { + "line": 29, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 557, + 561 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 550, + 556 + ], + "loc": { + "start": { + "line": 29, + "column": 30 + }, + "end": { + "line": 29, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 557, + 561 + ], + "loc": { + "start": { + "line": 29, + "column": 37 + }, + "end": { + "line": 29, + "column": 41 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 514, + 518 + ], + "loc": { + "start": { + "line": 28, + "column": 16 + }, + "end": { + "line": 28, + "column": 20 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 550, + 556 + ], + "loc": { + "start": { + "line": 29, + "column": 30 + }, + "end": { + "line": 29, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Todo", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 29, + "column": 2 + }, + "end": { + "line": 29, + "column": 6 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Todo", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json new file mode 100644 index 00000000..c3e51915 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json @@ -0,0 +1,998 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "afterUpdate", + "identifiers": [ + { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "local": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 150, + 161 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + }, + { + "name": "flash", + "identifiers": [ + { + "type": "Identifier", + "name": "flash", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "flash", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "flash", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flash", + "range": [ + 172, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flash", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "init": null, + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 373, + 377 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 25, + "column": 25 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ] + }, + { + "name": "div", + "identifiers": [ + { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "init": null, + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 178, + 181 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 356, + 359 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 150, + 161 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 56, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 356, + 359 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 373, + 377 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 396, + 400 + ], + "loc": { + "start": { + "line": 25, + "column": 25 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 131, + 135 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flash", + "range": [ + 172, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flash", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 178, + 181 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "flash", + "range": [ + 172, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flash", + "range": [ + 93, + 98 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 178, + 181 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 143, + 146 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json new file mode 100644 index 00000000..b73251da --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json @@ -0,0 +1,998 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "afterUpdate", + "identifiers": [ + { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "local": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 143, + 154 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ] + }, + { + "name": "flash", + "identifiers": [ + { + "type": "Identifier", + "name": "flash", + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "flash", + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "flash", + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flash", + "range": [ + 165, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flash", + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + } + ] + }, + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "init": null, + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 389, + 393 + ], + "loc": { + "start": { + "line": 25, + "column": 25 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ] + }, + { + "name": "div", + "identifiers": [ + { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "init": null, + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 143, + 154 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 49, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 349, + 352 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [ + 389, + 393 + ], + "loc": { + "start": { + "line": 25, + "column": 25 + }, + "end": { + "line": 25, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [ + 124, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "flash", + "range": [ + 165, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flash", + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "flash", + "range": [ + 165, + 170 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "flash", + "range": [ + 86, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 171, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 136, + 139 + ], + "loc": { + "start": { + "line": 8, + "column": 5 + }, + "end": { + "line": 8, + "column": 8 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json new file mode 100644 index 00000000..66141254 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json @@ -0,0 +1,2448 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Folder", + "identifiers": [ + { + "type": "Identifier", + "name": "Folder", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Folder", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Folder", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Folder", + "range": [ + 793, + 799 + ], + "loc": { + "start": { + "line": 41, + "column": 1 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Folder", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "root", + "identifiers": [ + { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 70, + 74 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'folder'", + "value": "folder", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 70, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 89, + 93 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Important work stuff'", + "value": "Important work stuff", + "range": [ + 95, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + "range": [ + 89, + 117 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "files", + "range": [ + 122, + 127 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 137, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 143, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "range": [ + 137, + 149 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 151, + 155 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'quarterly-results.xlsx'", + "value": "quarterly-results.xlsx", + "range": [ + 157, + 181 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 50 + } + } + }, + "range": [ + 151, + 181 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 50 + } + } + } + ], + "range": [ + 135, + 183 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 52 + } + } + } + ], + "range": [ + 129, + 188 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + "range": [ + 122, + 188 + ], + "loc": { + "start": { + "line": 8, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + } + ], + "range": [ + 65, + 192 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 201, + 205 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'folder'", + "value": "folder", + "range": [ + 207, + 215 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + "range": [ + 201, + 215 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 220, + 224 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Animal GIFs'", + "value": "Animal GIFs", + "range": [ + 226, + 239 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 22 + } + } + }, + "range": [ + 220, + 239 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 22 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "files", + "range": [ + 244, + 249 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 264, + 268 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'folder'", + "value": "folder", + "range": [ + 270, + 278 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + "range": [ + 264, + 278 + ], + "loc": { + "start": { + "line": 17, + "column": 5 + }, + "end": { + "line": 17, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 285, + 289 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Dogs'", + "value": "Dogs", + "range": [ + 291, + 297 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + "range": [ + 285, + 297 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "files", + "range": [ + 304, + 309 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 321, + 325 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 327, + 333 + ], + "loc": { + "start": { + "line": 20, + "column": 14 + }, + "end": { + "line": 20, + "column": 20 + } + } + }, + "range": [ + 321, + 333 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 335, + 339 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 26 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'treadmill.gif'", + "value": "treadmill.gif", + "range": [ + 341, + 356 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 43 + } + } + }, + "range": [ + 335, + 356 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 43 + } + } + } + ], + "range": [ + 319, + 358 + ], + "loc": { + "start": { + "line": 20, + "column": 6 + }, + "end": { + "line": 20, + "column": 45 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 368, + 372 + ], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 374, + 380 + ], + "loc": { + "start": { + "line": 21, + "column": 14 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + "range": [ + 368, + 380 + ], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 382, + 386 + ], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 26 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'rope-jumping.gif'", + "value": "rope-jumping.gif", + "range": [ + 388, + 406 + ], + "loc": { + "start": { + "line": 21, + "column": 28 + }, + "end": { + "line": 21, + "column": 46 + } + } + }, + "range": [ + 382, + 406 + ], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 46 + } + } + } + ], + "range": [ + 366, + 408 + ], + "loc": { + "start": { + "line": 21, + "column": 6 + }, + "end": { + "line": 21, + "column": 48 + } + } + } + ], + "range": [ + 311, + 415 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + "range": [ + 304, + 415 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 22, + "column": 6 + } + } + } + ], + "range": [ + 257, + 421 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 23, + "column": 5 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 434, + 438 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'folder'", + "value": "folder", + "range": [ + 440, + 448 + ], + "loc": { + "start": { + "line": 25, + "column": 11 + }, + "end": { + "line": 25, + "column": 19 + } + } + }, + "range": [ + 434, + 448 + ], + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 455, + 459 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'Goats'", + "value": "Goats", + "range": [ + 461, + 468 + ], + "loc": { + "start": { + "line": 26, + "column": 11 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "range": [ + 455, + 468 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "files", + "range": [ + 475, + 480 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 27, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 492, + 496 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 498, + 504 + ], + "loc": { + "start": { + "line": 28, + "column": 14 + }, + "end": { + "line": 28, + "column": 20 + } + } + }, + "range": [ + 492, + 504 + ], + "loc": { + "start": { + "line": 28, + "column": 8 + }, + "end": { + "line": 28, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 506, + 510 + ], + "loc": { + "start": { + "line": 28, + "column": 22 + }, + "end": { + "line": 28, + "column": 26 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'parkour.gif'", + "value": "parkour.gif", + "range": [ + 512, + 525 + ], + "loc": { + "start": { + "line": 28, + "column": 28 + }, + "end": { + "line": 28, + "column": 41 + } + } + }, + "range": [ + 506, + 525 + ], + "loc": { + "start": { + "line": 28, + "column": 22 + }, + "end": { + "line": 28, + "column": 41 + } + } + } + ], + "range": [ + 490, + 527 + ], + "loc": { + "start": { + "line": 28, + "column": 6 + }, + "end": { + "line": 28, + "column": 43 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 537, + 541 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 543, + 549 + ], + "loc": { + "start": { + "line": 29, + "column": 14 + }, + "end": { + "line": 29, + "column": 20 + } + } + }, + "range": [ + 537, + 549 + ], + "loc": { + "start": { + "line": 29, + "column": 8 + }, + "end": { + "line": 29, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 551, + 555 + ], + "loc": { + "start": { + "line": 29, + "column": 22 + }, + "end": { + "line": 29, + "column": 26 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'rampage.gif'", + "value": "rampage.gif", + "range": [ + 557, + 570 + ], + "loc": { + "start": { + "line": 29, + "column": 28 + }, + "end": { + "line": 29, + "column": 41 + } + } + }, + "range": [ + 551, + 570 + ], + "loc": { + "start": { + "line": 29, + "column": 22 + }, + "end": { + "line": 29, + "column": 41 + } + } + } + ], + "range": [ + 535, + 572 + ], + "loc": { + "start": { + "line": 29, + "column": 6 + }, + "end": { + "line": 29, + "column": 43 + } + } + } + ], + "range": [ + 482, + 579 + ], + "loc": { + "start": { + "line": 27, + "column": 12 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + "range": [ + 475, + 579 + ], + "loc": { + "start": { + "line": 27, + "column": 5 + }, + "end": { + "line": 30, + "column": 6 + } + } + } + ], + "range": [ + 427, + 585 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 31, + "column": 5 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 32, + "column": 6 + }, + "end": { + "line": 32, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 599, + 605 + ], + "loc": { + "start": { + "line": 32, + "column": 12 + }, + "end": { + "line": 32, + "column": 18 + } + } + }, + "range": [ + 593, + 605 + ], + "loc": { + "start": { + "line": 32, + "column": 6 + }, + "end": { + "line": 32, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 607, + 611 + ], + "loc": { + "start": { + "line": 32, + "column": 20 + }, + "end": { + "line": 32, + "column": 24 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'cat-roomba.gif'", + "value": "cat-roomba.gif", + "range": [ + 613, + 629 + ], + "loc": { + "start": { + "line": 32, + "column": 26 + }, + "end": { + "line": 32, + "column": 42 + } + } + }, + "range": [ + 607, + 629 + ], + "loc": { + "start": { + "line": 32, + "column": 20 + }, + "end": { + "line": 32, + "column": 42 + } + } + } + ], + "range": [ + 591, + 631 + ], + "loc": { + "start": { + "line": 32, + "column": 4 + }, + "end": { + "line": 32, + "column": 44 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 639, + 643 + ], + "loc": { + "start": { + "line": 33, + "column": 6 + }, + "end": { + "line": 33, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 645, + 651 + ], + "loc": { + "start": { + "line": 33, + "column": 12 + }, + "end": { + "line": 33, + "column": 18 + } + } + }, + "range": [ + 639, + 651 + ], + "loc": { + "start": { + "line": 33, + "column": 6 + }, + "end": { + "line": 33, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 653, + 657 + ], + "loc": { + "start": { + "line": 33, + "column": 20 + }, + "end": { + "line": 33, + "column": 24 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'duck-shuffle.gif'", + "value": "duck-shuffle.gif", + "range": [ + 659, + 677 + ], + "loc": { + "start": { + "line": 33, + "column": 26 + }, + "end": { + "line": 33, + "column": 44 + } + } + }, + "range": [ + 653, + 677 + ], + "loc": { + "start": { + "line": 33, + "column": 20 + }, + "end": { + "line": 33, + "column": 44 + } + } + } + ], + "range": [ + 637, + 679 + ], + "loc": { + "start": { + "line": 33, + "column": 4 + }, + "end": { + "line": 33, + "column": 46 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 687, + 691 + ], + "loc": { + "start": { + "line": 34, + "column": 6 + }, + "end": { + "line": 34, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 693, + 699 + ], + "loc": { + "start": { + "line": 34, + "column": 12 + }, + "end": { + "line": 34, + "column": 18 + } + } + }, + "range": [ + 687, + 699 + ], + "loc": { + "start": { + "line": 34, + "column": 6 + }, + "end": { + "line": 34, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 701, + 705 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 34, + "column": 24 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'monkey-on-a-pig.gif'", + "value": "monkey-on-a-pig.gif", + "range": [ + 707, + 728 + ], + "loc": { + "start": { + "line": 34, + "column": 26 + }, + "end": { + "line": 34, + "column": 47 + } + } + }, + "range": [ + 701, + 728 + ], + "loc": { + "start": { + "line": 34, + "column": 20 + }, + "end": { + "line": 34, + "column": 47 + } + } + } + ], + "range": [ + 685, + 730 + ], + "loc": { + "start": { + "line": 34, + "column": 4 + }, + "end": { + "line": 34, + "column": 49 + } + } + } + ], + "range": [ + 251, + 735 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 35, + "column": 4 + } + } + }, + "range": [ + 244, + 735 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 35, + "column": 4 + } + } + } + ], + "range": [ + 196, + 739 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 36, + "column": 3 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "type", + "range": [ + 745, + 749 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'file'", + "value": "file", + "range": [ + 751, + 757 + ], + "loc": { + "start": { + "line": 37, + "column": 10 + }, + "end": { + "line": 37, + "column": 16 + } + } + }, + "range": [ + 745, + 757 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "name", + "range": [ + 759, + 763 + ], + "loc": { + "start": { + "line": 37, + "column": 18 + }, + "end": { + "line": 37, + "column": 22 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'TODO.md'", + "value": "TODO.md", + "range": [ + 765, + 774 + ], + "loc": { + "start": { + "line": 37, + "column": 24 + }, + "end": { + "line": 37, + "column": 33 + } + } + }, + "range": [ + 759, + 774 + ], + "loc": { + "start": { + "line": 37, + "column": 18 + }, + "end": { + "line": 37, + "column": 33 + } + } + } + ], + "range": [ + 743, + 776 + ], + "loc": { + "start": { + "line": 37, + "column": 2 + }, + "end": { + "line": 37, + "column": 35 + } + } + } + ], + "range": [ + 61, + 779 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 38, + "column": 2 + } + } + }, + "range": [ + 54, + 779 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 38, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "root", + "range": [ + 819, + 823 + ], + "loc": { + "start": { + "line": 41, + "column": 27 + }, + "end": { + "line": 41, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "root", + "range": [ + 819, + 823 + ], + "loc": { + "start": { + "line": 41, + "column": 27 + }, + "end": { + "line": 41, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "root", + "range": [ + 54, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Folder", + "range": [ + 793, + 799 + ], + "loc": { + "start": { + "line": 41, + "column": 1 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Folder", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json new file mode 100644 index 00000000..4c39c697 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json @@ -0,0 +1,810 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "init": null, + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 49, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 14, + "column": 64 + }, + "end": { + "line": 14, + "column": 68 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "type", + "identifiers": [ + { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'.'", + "value": ".", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 42 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "name", + "range": [ + 49, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "lastIndexOf", + "range": [ + 54, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "range": [ + 49, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "optional": false, + "range": [ + 49, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 43 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 46 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "range": [ + 49, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 47 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "name", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 43, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 38, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 38, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 48 + } + } + }, + "range": [ + 31, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 48 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "type", + "range": [ + 253, + 257 + ], + "loc": { + "start": { + "line": 14, + "column": 51 + }, + "end": { + "line": 14, + "column": 55 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 38, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 49, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "type", + "range": [ + 253, + 257 + ], + "loc": { + "start": { + "line": 14, + "column": 51 + }, + "end": { + "line": 14, + "column": 55 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "type", + "range": [ + 31, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 14, + "column": 64 + }, + "end": { + "line": 14, + "column": 68 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 21, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json new file mode 100644 index 00000000..b9abbfc6 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json @@ -0,0 +1,2575 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "File", + "identifiers": [ + { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "File", + "range": [ + 761, + 765 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "expanded", + "identifiers": [ + { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "range": [ + 57, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 28 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 136, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 148, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 585, + 593 + ], + "loc": { + "start": { + "line": 38, + "column": 12 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 632, + 640 + ], + "loc": { + "start": { + "line": 40, + "column": 5 + }, + "end": { + "line": 40, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + }, + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "init": null, + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 613, + 617 + ], + "loc": { + "start": { + "line": 38, + "column": 40 + }, + "end": { + "line": 38, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ] + }, + { + "name": "files", + "identifiers": [ + { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "init": null, + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 657, + 662 + ], + "loc": { + "start": { + "line": 42, + "column": 9 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + } + } + ] + }, + { + "name": "toggle", + "identifiers": [ + { + "type": "Identifier", + "name": "toggle", + "range": [ + 123, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "toggle", + "range": [ + 123, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "expanded", + "range": [ + 136, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "expanded", + "range": [ + 148, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 147, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "range": [ + 136, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "range": [ + 136, + 157 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 132, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 123, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + "params": [], + "range": [ + 114, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 604, + 610 + ], + "loc": { + "start": { + "line": 38, + "column": 31 + }, + "end": { + "line": 38, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 123, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 585, + 593 + ], + "loc": { + "start": { + "line": 38, + "column": 12 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 604, + 610 + ], + "loc": { + "start": { + "line": 38, + "column": 31 + }, + "end": { + "line": 38, + "column": 37 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 123, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 613, + 617 + ], + "loc": { + "start": { + "line": 38, + "column": 40 + }, + "end": { + "line": 38, + "column": 44 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 87, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 632, + 640 + ], + "loc": { + "start": { + "line": 40, + "column": 5 + }, + "end": { + "line": 40, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 136, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 148, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 136, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "expanded", + "range": [ + 148, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "expanded", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 20 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 657, + 662 + ], + "loc": { + "start": { + "line": 42, + "column": 9 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "file", + "identifiers": [ + { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "files", + "range": [ + 657, + 662 + ], + "loc": { + "start": { + "line": 42, + "column": 9 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + "context": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "li", + "range": [ + 676, + 678 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 6 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 675, + 679 + ], + "loc": { + "start": { + "line": 43, + "column": 3 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 679, + 684 + ], + "loc": { + "start": { + "line": 43, + "column": 7 + }, + "end": { + "line": 44, + "column": 4 + } + } + }, + { + "type": "SvelteIfBlock", + "elseif": false, + "expression": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "file", + "range": [ + 689, + 693 + ], + "loc": { + "start": { + "line": 44, + "column": 9 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "type", + "range": [ + 694, + 698 + ], + "loc": { + "start": { + "line": 44, + "column": 14 + }, + "end": { + "line": 44, + "column": 18 + } + } + }, + "range": [ + 689, + 698 + ], + "loc": { + "start": { + "line": 44, + "column": 9 + }, + "end": { + "line": 44, + "column": 18 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'folder'", + "value": "folder", + "range": [ + 703, + 711 + ], + "loc": { + "start": { + "line": 44, + "column": 23 + }, + "end": { + "line": 44, + "column": 31 + } + } + }, + "range": [ + 689, + 711 + ], + "loc": { + "start": { + "line": 44, + "column": 9 + }, + "end": { + "line": 44, + "column": 31 + } + } + }, + "children": [ + { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:self", + "range": [ + 719, + 730 + ], + "loc": { + "start": { + "line": 45, + "column": 6 + }, + "end": { + "line": 45, + "column": 17 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteSpreadAttribute", + "argument": { + "type": "Identifier", + "name": "file", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 45, + "column": 22 + }, + "end": { + "line": 45, + "column": 26 + } + } + }, + "range": [ + 731, + 740 + ], + "loc": { + "start": { + "line": 45, + "column": 18 + }, + "end": { + "line": 45, + "column": 27 + } + } + } + ], + "selfClosing": true, + "range": [ + 718, + 742 + ], + "loc": { + "start": { + "line": 45, + "column": 5 + }, + "end": { + "line": 45, + "column": 29 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 718, + 742 + ], + "loc": { + "start": { + "line": 45, + "column": 5 + }, + "end": { + "line": 45, + "column": 29 + } + } + } + ], + "else": { + "type": "SvelteElseBlock", + "elseif": false, + "children": [ + { + "type": "SvelteElement", + "kind": "component", + "name": { + "type": "Identifier", + "name": "File", + "range": [ + 761, + 765 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteSpreadAttribute", + "argument": { + "type": "Identifier", + "name": "file", + "range": [ + 770, + 774 + ], + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 19 + } + } + }, + "range": [ + 766, + 775 + ], + "loc": { + "start": { + "line": 47, + "column": 11 + }, + "end": { + "line": 47, + "column": 20 + } + } + } + ], + "selfClosing": true, + "range": [ + 760, + 777 + ], + "loc": { + "start": { + "line": 47, + "column": 5 + }, + "end": { + "line": 47, + "column": 22 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 760, + 777 + ], + "loc": { + "start": { + "line": 47, + "column": 5 + }, + "end": { + "line": 47, + "column": 22 + } + } + } + ], + "range": [ + 747, + 782 + ], + "loc": { + "start": { + "line": 46, + "column": 4 + }, + "end": { + "line": 48, + "column": 4 + } + } + }, + "range": [ + 684, + 787 + ], + "loc": { + "start": { + "line": 44, + "column": 4 + }, + "end": { + "line": 48, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 787, + 791 + ], + "loc": { + "start": { + "line": 48, + "column": 9 + }, + "end": { + "line": 49, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 791, + 796 + ], + "loc": { + "start": { + "line": 49, + "column": 3 + }, + "end": { + "line": 49, + "column": 8 + } + } + }, + "range": [ + 675, + 796 + ], + "loc": { + "start": { + "line": 43, + "column": 3 + }, + "end": { + "line": 49, + "column": 8 + } + } + } + ], + "else": null, + "range": [ + 650, + 806 + ], + "loc": { + "start": { + "line": 42, + "column": 2 + }, + "end": { + "line": 50, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 689, + 693 + ], + "loc": { + "start": { + "line": 44, + "column": 9 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 45, + "column": 22 + }, + "end": { + "line": 45, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 770, + 774 + ], + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 689, + 693 + ], + "loc": { + "start": { + "line": 44, + "column": 9 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 45, + "column": 22 + }, + "end": { + "line": 45, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 735, + 739 + ], + "loc": { + "start": { + "line": 45, + "column": 22 + }, + "end": { + "line": 45, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 770, + 774 + ], + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "File", + "range": [ + 761, + 765 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "file", + "range": [ + 770, + 774 + ], + "loc": { + "start": { + "line": 47, + "column": 15 + }, + "end": { + "line": 47, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "file", + "range": [ + 666, + 670 + ], + "loc": { + "start": { + "line": 42, + "column": 18 + }, + "end": { + "line": 42, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "File", + "range": [ + 761, + 765 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "File", + "range": [ + 761, + 765 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "files", + "range": [ + 657, + 662 + ], + "loc": { + "start": { + "line": 42, + "column": 9 + }, + "end": { + "line": 42, + "column": 14 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "files", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "File", + "range": [ + 761, + 765 + ], + "loc": { + "start": { + "line": 47, + "column": 6 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "File", + "range": [ + 17, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json new file mode 100644 index 00000000..9f544b73 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json @@ -0,0 +1,1996 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "layers", + "identifiers": [ + { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Literal", + "raw": "5", + "value": 5, + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 32 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + { + "type": "Literal", + "raw": "6", + "value": 6, + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "Literal", + "raw": "7", + "value": 7, + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + { + "type": "Literal", + "raw": "8", + "value": 8, + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 42 + } + } + } + ], + "range": [ + 25, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + "range": [ + 16, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 43 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 257, + 263 + ], + "loc": { + "start": { + "line": 12, + "column": 48 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "y", + "identifiers": [ + { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "init": null, + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 466, + 467 + ], + "loc": { + "start": { + "line": 20, + "column": 40 + }, + "end": { + "line": 20, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 548, + 549 + ], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 454, + 458 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 466, + 467 + ], + "loc": { + "start": { + "line": 20, + "column": 40 + }, + "end": { + "line": 20, + "column": 41 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 548, + 549 + ], + "loc": { + "start": { + "line": 25, + "column": 21 + }, + "end": { + "line": 25, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "layer", + "identifiers": [ + { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "layers", + "range": [ + 185, + 191 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + "context": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "img", + "range": [ + 205, + 208 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 6 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "style", + "range": [ + 212, + 217 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "transform: translate(0,", + "range": [ + 219, + 242 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "y", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 36 + } + } + }, + "operator": "-", + "prefix": true, + "range": [ + 243, + 245 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 36 + } + } + }, + "operator": "*", + "right": { + "type": "Identifier", + "name": "layer", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "range": [ + 243, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "operator": "/", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "layers", + "range": [ + 257, + 263 + ], + "loc": { + "start": { + "line": 12, + "column": 48 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 264, + 270 + ], + "loc": { + "start": { + "line": 12, + "column": 55 + }, + "end": { + "line": 12, + "column": 61 + } + } + }, + "range": [ + 257, + 270 + ], + "loc": { + "start": { + "line": 12, + "column": 48 + }, + "end": { + "line": 12, + "column": 61 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 273, + 274 + ], + "loc": { + "start": { + "line": 12, + "column": 64 + }, + "end": { + "line": 12, + "column": 65 + } + } + }, + "range": [ + 257, + 274 + ], + "loc": { + "start": { + "line": 12, + "column": 48 + }, + "end": { + "line": 12, + "column": 65 + } + } + }, + "range": [ + 243, + 275 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 66 + } + } + }, + "range": [ + 242, + 276 + ], + "loc": { + "start": { + "line": 12, + "column": 33 + }, + "end": { + "line": 12, + "column": 67 + } + } + }, + { + "type": "SvelteLiteral", + "value": "px)", + "range": [ + 276, + 279 + ], + "loc": { + "start": { + "line": 12, + "column": 67 + }, + "end": { + "line": 12, + "column": 70 + } + } + } + ], + "range": [ + 212, + 280 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 71 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "src", + "range": [ + 284, + 287 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "https://www.firewatchgame.com/images/parallax/parallax", + "range": [ + 289, + 343 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 62 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "layer", + "range": [ + 344, + 349 + ], + "loc": { + "start": { + "line": 13, + "column": 63 + }, + "end": { + "line": 13, + "column": 68 + } + } + }, + "range": [ + 343, + 350 + ], + "loc": { + "start": { + "line": 13, + "column": 62 + }, + "end": { + "line": 13, + "column": 69 + } + } + }, + { + "type": "SvelteLiteral", + "value": ".png", + "range": [ + 350, + 354 + ], + "loc": { + "start": { + "line": 13, + "column": 69 + }, + "end": { + "line": 13, + "column": 73 + } + } + } + ], + "range": [ + 284, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 74 + } + } + }, + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "alt", + "range": [ + 359, + 362 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 6 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "parallax layer ", + "range": [ + 364, + 379 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "layer", + "range": [ + 380, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "range": [ + 379, + 386 + ], + "loc": { + "start": { + "line": 14, + "column": 23 + }, + "end": { + "line": 14, + "column": 30 + } + } + } + ], + "range": [ + 359, + 387 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 31 + } + } + } + ], + "selfClosing": false, + "range": [ + 204, + 391 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 204, + 391 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 15, + "column": 3 + } + } + } + ], + "else": null, + "range": [ + 178, + 400 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 16, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "layer", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layer", + "range": [ + 344, + 349 + ], + "loc": { + "start": { + "line": 13, + "column": 63 + }, + "end": { + "line": 13, + "column": 68 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layer", + "range": [ + 380, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layer", + "range": [ + 248, + 253 + ], + "loc": { + "start": { + "line": 12, + "column": 39 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 257, + 263 + ], + "loc": { + "start": { + "line": 12, + "column": 48 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layer", + "range": [ + 344, + 349 + ], + "loc": { + "start": { + "line": 13, + "column": 63 + }, + "end": { + "line": 13, + "column": 68 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layer", + "range": [ + 380, + 385 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layer", + "range": [ + 195, + 200 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 23 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "y", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 12, + "column": 35 + }, + "end": { + "line": 12, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "y", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "layers", + "range": [ + 257, + 263 + ], + "loc": { + "start": { + "line": 12, + "column": 48 + }, + "end": { + "line": 12, + "column": 54 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "layers", + "range": [ + 16, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 454, + 458 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 454, + 458 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json new file mode 100644 index 00000000..0bd63273 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json @@ -0,0 +1,1839 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "key", + "identifiers": [ + { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": null, + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 646, + 649 + ], + "loc": { + "start": { + "line": 36, + "column": 6 + }, + "end": { + "line": 36, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 659, + 662 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 683, + 686 + ], + "loc": { + "start": { + "line": 37, + "column": 32 + }, + "end": { + "line": 37, + "column": 35 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + }, + { + "name": "keyCode", + "identifiers": [ + { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": null, + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 700, + 707 + ], + "loc": { + "start": { + "line": 38, + "column": 6 + }, + "end": { + "line": 38, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + }, + { + "name": "handleKeydown", + "identifiers": [ + { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 44, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 44, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "key", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 81, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 69, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 69, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 98, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 88, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 88, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 44, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "range": [ + 35, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 589, + 602 + ], + "loc": { + "start": { + "line": 33, + "column": 27 + }, + "end": { + "line": 33, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 44, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 589, + 602 + ], + "loc": { + "start": { + "line": 33, + "column": 27 + }, + "end": { + "line": 33, + "column": 40 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 44, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 646, + 649 + ], + "loc": { + "start": { + "line": 36, + "column": 6 + }, + "end": { + "line": 36, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "key", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 81, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 69, + 84 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + "range": [ + 69, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 104, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 18 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 98, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 88, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + "range": [ + 88, + 112 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 26 + } + } + } + ], + "range": [ + 65, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 44, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "range": [ + 35, + 115 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 75, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 98, + 103 + ], + "loc": { + "start": { + "line": 7, + "column": 12 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 88, + 95 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 659, + 662 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 683, + 686 + ], + "loc": { + "start": { + "line": 37, + "column": 32 + }, + "end": { + "line": 37, + "column": 35 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 700, + 707 + ], + "loc": { + "start": { + "line": 38, + "column": 6 + }, + "end": { + "line": 38, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 659, + 662 + ], + "loc": { + "start": { + "line": 37, + "column": 8 + }, + "end": { + "line": 37, + "column": 11 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "key", + "range": [ + 683, + 686 + ], + "loc": { + "start": { + "line": 37, + "column": 32 + }, + "end": { + "line": 37, + "column": 35 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "key", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 700, + 707 + ], + "loc": { + "start": { + "line": 38, + "column": 6 + }, + "end": { + "line": 38, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "keyCode", + "range": [ + 24, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + }, + { + "type": "block", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json new file mode 100644 index 00000000..19ee68bb --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json @@ -0,0 +1,378 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'world'", + "value": "world", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 14, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 60, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 79, + 83 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json new file mode 100644 index 00000000..4a5b1da7 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json @@ -0,0 +1,378 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "init": { + "type": "Literal", + "raw": "'world'", + "value": "world", + "range": [ + 21, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 14, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 55, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 74, + 78 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 55, + 59 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 74, + 78 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 14, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 9 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json new file mode 100644 index 00000000..814aebfa --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json @@ -0,0 +1,564 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "marked", + "identifiers": [ + { + "type": "Identifier", + "name": "marked", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "marked", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "marked", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "marked", + "range": [ + 210, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "marked", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "init": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "Some words are *italic*, some are **bold**", + "raw": "Some words are *italic*, some are **bold**" + }, + "range": [ + 52, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 57 + } + } + } + ], + "range": [ + 52, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 57 + } + } + }, + "range": [ + 44, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 57 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 184, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 217, + 222 + ], + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 184, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "marked", + "range": [ + 210, + 216 + ], + "loc": { + "start": { + "line": 12, + "column": 7 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "marked", + "range": [ + 17, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 217, + 222 + ], + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 44, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json new file mode 100644 index 00000000..cd8da317 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json @@ -0,0 +1,7053 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tick", + "identifiers": [ + { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 609, + 613 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "init": { + "type": "TemplateLiteral", + "expressions": [], + "quasis": [ + { + "type": "TemplateElement", + "tail": true, + "value": { + "cooked": "Select some text and hit the tab key to toggle uppercase", + "raw": "Select some text and hit the tab key to toggle uppercase" + }, + "range": [ + 53, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 70 + } + } + } + ], + "range": [ + 53, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 70 + } + } + }, + "range": [ + 46, + 111 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 70 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 444, + 448 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 789, + 793 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + } + ] + }, + { + "name": "handleKeydown", + "identifiers": [ + { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": true, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 180, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 159, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "operator": "!==", + "right": { + "type": "Literal", + "raw": "'Tab'", + "value": "Tab", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 159, + 178 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 155, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 191, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "preventDefault", + "range": [ + 197, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + "range": [ + 191, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 191, + 213 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "range": [ + 191, + 214 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + ], + "range": [ + 224, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "init": { + "type": "ThisExpression", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 54 + } + } + }, + "range": [ + 224, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 54 + } + } + } + ], + "range": [ + 218, + 271 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 55 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 304, + 318 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 320, + 332 + ], + "loc": { + "start": { + "line": 11, + "column": 48 + }, + "end": { + "line": 11, + "column": 60 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 292, + 297 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 298, + 303 + ], + "loc": { + "start": { + "line": 11, + "column": 26 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 292, + 303 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 292, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 61 + } + } + }, + "range": [ + 280, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 61 + } + } + } + ], + "range": [ + 274, + 334 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 62 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selection", + "range": [ + 416, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toLowerCase", + "range": [ + 426, + 437 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "range": [ + 416, + 437 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 416, + 439 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "consequent": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selection", + "range": [ + 387, + 396 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toUpperCase", + "range": [ + 397, + 408 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "range": [ + 387, + 408 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 387, + 410 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 28 + } + } + }, + "test": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selection", + "range": [ + 371, + 380 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 44 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Literal", + "raw": "/[a-z]/", + "regex": { + "flags": "", + "pattern": "[a-z]" + }, + "value": "/[a-z]/", + "range": [ + 358, + 365 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "test", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 358, + 381 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 45 + } + } + }, + "range": [ + 358, + 439 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "range": [ + 344, + 439 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 15, + "column": 28 + } + } + } + ], + "range": [ + 338, + 440 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 15, + "column": 29 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "text", + "range": [ + 444, + 448 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 468, + 469 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 471, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 32 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 462, + 467 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "range": [ + 456, + 467 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 456, + 486 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "replacement", + "range": [ + 492, + 503 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "range": [ + 456, + 503 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "operator": "+", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 521, + 533 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 509, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 515, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 9 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "range": [ + 509, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 509, + 534 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 456, + 534 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 444, + 538 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 444, + 539 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "tick", + "range": [ + 609, + 613 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 609, + 615 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + "range": [ + 603, + 615 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + "range": [ + 603, + 616 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 619, + 623 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 624, + 638 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "range": [ + 619, + 638 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 641, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 38 + } + } + }, + "range": [ + 619, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 38 + } + } + }, + "range": [ + 619, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 39 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 659, + 663 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 664, + 676 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "range": [ + 659, + 676 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 679, + 691 + ], + "loc": { + "start": { + "line": 26, + "column": 22 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + "range": [ + 659, + 691 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + "range": [ + 659, + 692 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 35 + } + } + } + ], + "range": [ + 151, + 695 + ], + "loc": { + "start": { + "line": 5, + "column": 37 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + ], + "range": [ + 115, + 695 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 27, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 807, + 820 + ], + "loc": { + "start": { + "line": 37, + "column": 35 + }, + "end": { + "line": 37, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 789, + 793 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 807, + 820 + ], + "loc": { + "start": { + "line": 37, + "column": 35 + }, + "end": { + "line": 37, + "column": 48 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": true, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 180, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 159, + 168 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "operator": "!==", + "right": { + "type": "Literal", + "raw": "'Tab'", + "value": "Tab", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 159, + 178 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + "range": [ + 155, + 187 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 191, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "preventDefault", + "range": [ + 197, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + "range": [ + 191, + 211 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 191, + 213 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + "range": [ + 191, + 214 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + ], + "range": [ + 224, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "init": { + "type": "ThisExpression", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 54 + } + } + }, + "range": [ + 224, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 54 + } + } + } + ], + "range": [ + 218, + 271 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 55 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 304, + 318 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 320, + 332 + ], + "loc": { + "start": { + "line": 11, + "column": 48 + }, + "end": { + "line": 11, + "column": 60 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 292, + 297 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 298, + 303 + ], + "loc": { + "start": { + "line": 11, + "column": 26 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 292, + 303 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 292, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 61 + } + } + }, + "range": [ + 280, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 61 + } + } + } + ], + "range": [ + 274, + 334 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 62 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selection", + "range": [ + 416, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toLowerCase", + "range": [ + 426, + 437 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "range": [ + 416, + 437 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 416, + 439 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "consequent": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selection", + "range": [ + 387, + 396 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toUpperCase", + "range": [ + 397, + 408 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "range": [ + 387, + 408 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 387, + 410 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 28 + } + } + }, + "test": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selection", + "range": [ + 371, + 380 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 44 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Literal", + "raw": "/[a-z]/", + "regex": { + "flags": "", + "pattern": "[a-z]" + }, + "value": "/[a-z]/", + "range": [ + 358, + 365 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "test", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 358, + 381 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 45 + } + } + }, + "range": [ + 358, + 439 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "range": [ + 344, + 439 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 15, + "column": 28 + } + } + } + ], + "range": [ + 338, + 440 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 15, + "column": 29 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "text", + "range": [ + 444, + 448 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + "operator": "=", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 468, + 469 + ], + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 471, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 32 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 462, + 467 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "range": [ + 456, + 467 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 456, + 486 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 33 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "replacement", + "range": [ + 492, + 503 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "range": [ + 456, + 503 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "operator": "+", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 521, + 533 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 509, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 515, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 9 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "range": [ + 509, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 509, + 534 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 456, + 534 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "range": [ + 444, + 538 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 444, + 539 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 21, + "column": 4 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AwaitExpression", + "argument": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "tick", + "range": [ + 609, + 613 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 609, + 615 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + "range": [ + 603, + 615 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + "range": [ + 603, + 616 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 15 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 619, + 623 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 624, + 638 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "range": [ + 619, + 638 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 641, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 38 + } + } + }, + "range": [ + 619, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 38 + } + } + }, + "range": [ + 619, + 656 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 39 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "ThisExpression", + "range": [ + 659, + 663 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 664, + 676 + ], + "loc": { + "start": { + "line": 26, + "column": 7 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "range": [ + 659, + 676 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 19 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 679, + 691 + ], + "loc": { + "start": { + "line": 26, + "column": 22 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + "range": [ + 659, + 691 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + "range": [ + 659, + 692 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 35 + } + } + } + ], + "range": [ + 151, + 695 + ], + "loc": { + "start": { + "line": 5, + "column": 37 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + ], + "range": [ + 115, + 695 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 27, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 191, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + } + ] + }, + { + "name": "selectionStart", + "identifiers": [ + { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + ], + "range": [ + 224, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "init": { + "type": "ThisExpression", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 54 + } + } + }, + "range": [ + 224, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 304, + 318 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 471, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 641, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + } + ] + }, + { + "name": "selectionEnd", + "identifiers": [ + { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + ], + "range": [ + 224, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "init": { + "type": "ThisExpression", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 54 + } + } + }, + "range": [ + 224, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 320, + 332 + ], + "loc": { + "start": { + "line": 11, + "column": 48 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 521, + 533 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 679, + 691 + ], + "loc": { + "start": { + "line": 26, + "column": 22 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + } + ] + }, + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + ], + "range": [ + 224, + 263 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 47 + } + } + }, + "init": { + "type": "ThisExpression", + "range": [ + 266, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 50 + }, + "end": { + "line": 10, + "column": 54 + } + } + }, + "range": [ + 224, + 270 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 292, + 297 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 509, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + } + ] + }, + { + "name": "selection", + "identifiers": [ + { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 304, + 318 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 320, + 332 + ], + "loc": { + "start": { + "line": 11, + "column": 48 + }, + "end": { + "line": 11, + "column": 60 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "value", + "range": [ + 292, + 297 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "slice", + "range": [ + 298, + 303 + ], + "loc": { + "start": { + "line": 11, + "column": 26 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "range": [ + 292, + 303 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 292, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 61 + } + } + }, + "range": [ + 280, + 333 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 61 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 371, + 380 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 387, + 396 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 416, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + } + ] + }, + { + "name": "replacement", + "identifiers": [ + { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "init": { + "type": "ConditionalExpression", + "alternate": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selection", + "range": [ + 416, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toLowerCase", + "range": [ + 426, + 437 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "range": [ + 416, + 437 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 416, + 439 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "consequent": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "selection", + "range": [ + 387, + 396 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "toUpperCase", + "range": [ + 397, + 408 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "range": [ + 387, + 408 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 387, + 410 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 28 + } + } + }, + "test": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "selection", + "range": [ + 371, + 380 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 44 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Literal", + "raw": "/[a-z]/", + "regex": { + "flags": "", + "pattern": "[a-z]" + }, + "value": "/[a-z]/", + "range": [ + 358, + 365 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "test", + "range": [ + 366, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 30 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "range": [ + 358, + 370 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 358, + 381 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 45 + } + } + }, + "range": [ + 358, + 439 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "range": [ + 344, + 439 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 15, + "column": 28 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "replacement", + "range": [ + 492, + 503 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 191, + 196 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 144, + 149 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 35 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 292, + 297 + ], + "loc": { + "start": { + "line": 11, + "column": 20 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 304, + 318 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 320, + 332 + ], + "loc": { + "start": { + "line": 11, + "column": 48 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 371, + 380 + ], + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 387, + 396 + ], + "loc": { + "start": { + "line": 14, + "column": 5 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selection", + "range": [ + 416, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selection", + "range": [ + 280, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 444, + 448 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 456, + 461 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 471, + 485 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "replacement", + "range": [ + 492, + 503 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "replacement", + "range": [ + 344, + 355 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 509, + 514 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 45 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 521, + 533 + ], + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 609, + 613 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 641, + 655 + ], + "loc": { + "start": { + "line": 25, + "column": 24 + }, + "end": { + "line": 25, + "column": 38 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionStart", + "range": [ + 226, + 240 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 24 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 679, + 691 + ], + "loc": { + "start": { + "line": 26, + "column": 22 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "selectionEnd", + "range": [ + 242, + 254 + ], + "loc": { + "start": { + "line": 10, + "column": 26 + }, + "end": { + "line": 10, + "column": 38 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 444, + 448 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 46, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 609, + 613 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json new file mode 100644 index 00000000..91b57371 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json @@ -0,0 +1,1548 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "fly", + "identifiers": [ + { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "local": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 243, + 246 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 57, + 71 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 183, + 190 + ], + "loc": { + "start": { + "line": 11, + "column": 38 + }, + "end": { + "line": 11, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ] + }, + { + "name": "status", + "identifiers": [ + { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "init": { + "type": "Literal", + "raw": "'waiting...'", + "value": "waiting...", + "range": [ + 87, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 78, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 124, + 130 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 302, + 308 + ], + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 353, + 359 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 402, + 408 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 449, + 455 + ], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 124, + 130 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 183, + 190 + ], + "loc": { + "start": { + "line": 11, + "column": 38 + }, + "end": { + "line": 11, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 243, + 246 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 302, + 308 + ], + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 302, + 308 + ], + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 353, + 359 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 353, + 359 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 402, + 408 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 402, + 408 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 449, + 455 + ], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 449, + 455 + ], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fly", + "range": [ + 243, + 246 + ], + "loc": { + "start": { + "line": 17, + "column": 13 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fly", + "range": [ + 19, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 302, + 308 + ], + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 353, + 359 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 19, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 402, + 408 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "status", + "range": [ + 449, + 455 + ], + "loc": { + "start": { + "line": 21, + "column": 22 + }, + "end": { + "line": 21, + "column": 28 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "status", + "range": [ + 78, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 11 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json new file mode 100644 index 00000000..65393d1c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json @@ -0,0 +1,609 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "fade", + "identifiers": [ + { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 188, + 192 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "visible", + "identifiers": [ + { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "init": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 67, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 57, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 130, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 164, + 171 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 130, + 137 + ], + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "visible", + "range": [ + 164, + 171 + ], + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "visible", + "range": [ + 57, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 12 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 188, + 192 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "fade", + "range": [ + 188, + 192 + ], + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "fade", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json new file mode 100644 index 00000000..ed9f8f1d --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json @@ -0,0 +1,1478 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tweened", + "identifiers": [ + { + "type": "Identifier", + "name": "tweened", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "tweened", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "tweened", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "tweened", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tweened", + "range": [ + 113, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tweened", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "cubicOut", + "identifiers": [ + { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ] + }, + { + "name": "progress", + "identifiers": [ + { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "duration", + "range": [ + 128, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "400", + "value": 400, + "range": [ + 138, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 128, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "easing", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "range": [ + 145, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 18 + } + } + } + ], + "range": [ + 124, + 164 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "tweened", + "range": [ + 113, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "optional": false, + "range": [ + 113, + 165 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + "range": [ + 102, + 165 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$progress", + "range": [ + 261, + 270 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 310, + 318 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 369, + 377 + ], + "loc": { + "start": { + "line": 24, + "column": 25 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 28, + "column": 25 + }, + "end": { + "line": 28, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 494, + 502 + ], + "loc": { + "start": { + "line": 32, + "column": 25 + }, + "end": { + "line": 32, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 557, + 565 + ], + "loc": { + "start": { + "line": 36, + "column": 25 + }, + "end": { + "line": 36, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tweened", + "range": [ + 113, + 120 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tweened", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "cubicOut", + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$progress", + "range": [ + 261, + 270 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 310, + 318 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 310, + 318 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 369, + 377 + ], + "loc": { + "start": { + "line": 24, + "column": 25 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 369, + 377 + ], + "loc": { + "start": { + "line": 24, + "column": 25 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 28, + "column": 25 + }, + "end": { + "line": 28, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 432, + 440 + ], + "loc": { + "start": { + "line": 28, + "column": 25 + }, + "end": { + "line": 28, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 494, + 502 + ], + "loc": { + "start": { + "line": 32, + "column": 25 + }, + "end": { + "line": 32, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 494, + 502 + ], + "loc": { + "start": { + "line": 32, + "column": 25 + }, + "end": { + "line": 32, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 557, + 565 + ], + "loc": { + "start": { + "line": 36, + "column": 25 + }, + "end": { + "line": 36, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "progress", + "range": [ + 557, + 565 + ], + "loc": { + "start": { + "line": 36, + "column": 25 + }, + "end": { + "line": 36, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "progress", + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json new file mode 100644 index 00000000..279f54e3 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json @@ -0,0 +1,11188 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "Eliza", + "identifiers": [ + { + "type": "Identifier", + "name": "Eliza", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 333, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + } + ] + }, + { + "name": "beforeUpdate", + "identifiers": [ + { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "local": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + } + ] + }, + { + "name": "afterUpdate", + "identifiers": [ + { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "local": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 235, + 246 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + } + ] + }, + { + "name": "div", + "identifiers": [ + { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "init": null, + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 159, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 167, + 170 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 186, + 189 + ], + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 9, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 204, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 60 + }, + "end": { + "line": 9, + "column": 63 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 289, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 1652, + 1655 + ], + "loc": { + "start": { + "line": 98, + "column": 36 + }, + "end": { + "line": 98, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "name": "autoscroll", + "identifiers": [ + { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "init": null, + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 146, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 261, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + } + ] + }, + { + "name": "eliza", + "identifiers": [ + { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "init": { + "type": "NewExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 333, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "range": [ + 329, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 15 + }, + "end": { + "line": 16, + "column": 26 + } + } + }, + "range": [ + 321, + 340 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + } + ] + }, + { + "name": "comments", + "identifiers": [ + { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 365, + 371 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'eliza'", + "value": "eliza", + "range": [ + 373, + 380 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 19 + } + } + }, + "range": [ + 365, + 380 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 19 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 382, + 386 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "eliza", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "getInitial", + "range": [ + 394, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 33 + }, + "end": { + "line": 19, + "column": 43 + } + } + }, + "range": [ + 388, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 43 + } + } + }, + "optional": false, + "range": [ + 388, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 45 + } + } + }, + "range": [ + 382, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 45 + } + } + } + ], + "range": [ + 363, + 408 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 47 + } + } + } + ], + "range": [ + 359, + 411 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + "range": [ + 348, + 411 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 20, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 540, + 548 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 551, + 559 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 1667, + 1675 + ], + "loc": { + "start": { + "line": 99, + "column": 9 + }, + "end": { + "line": 99, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + } + ] + }, + { + "name": "handleKeydown", + "identifiers": [ + { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 424, + 437 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 424, + 437 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 500, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 494, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 29 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 494, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 487, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 34 + } + } + } + ], + "range": [ + 481, + 513 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 35 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 528, + 535 + ], + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 521, + 526 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "range": [ + 517, + 535 + ], + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "comments", + "range": [ + 540, + 548 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 573, + 579 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'user'", + "value": "user", + "range": [ + 581, + 587 + ], + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + "range": [ + 573, + 587 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "text", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + } + ], + "range": [ + 567, + 602 + ], + "loc": { + "start": { + "line": 27, + "column": 30 + }, + "end": { + "line": 30, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comments", + "range": [ + 551, + 559 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 560, + 566 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 29 + } + } + }, + "range": [ + 551, + 566 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 551, + 603 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + "range": [ + 540, + 603 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + "range": [ + 540, + 604 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 615, + 621 + ], + "loc": { + "start": { + "line": 32, + "column": 9 + }, + "end": { + "line": 32, + "column": 15 + } + } + }, + "range": [ + 609, + 621 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 622, + 627 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "range": [ + 609, + 627 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 630, + 632 + ], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "range": [ + 609, + 632 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "range": [ + 609, + 633 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 27 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 668, + 672 + ], + "loc": { + "start": { + "line": 34, + "column": 33 + }, + "end": { + "line": 34, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 658, + 667 + ], + "loc": { + "start": { + "line": 34, + "column": 23 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + "range": [ + 652, + 667 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + "optional": false, + "range": [ + 652, + 673 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 38 + } + } + }, + "range": [ + 644, + 673 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 38 + } + } + } + ], + "range": [ + 638, + 674 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 39 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 736, + 742 + ], + "loc": { + "start": { + "line": 38, + "column": 5 + }, + "end": { + "line": 38, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'eliza'", + "value": "eliza", + "range": [ + 744, + 751 + ], + "loc": { + "start": { + "line": 38, + "column": 13 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + "range": [ + 736, + 751 + ], + "loc": { + "start": { + "line": 38, + "column": 5 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 758, + 762 + ], + "loc": { + "start": { + "line": 39, + "column": 5 + }, + "end": { + "line": 39, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'...'", + "value": "...", + "range": [ + 764, + 769 + ], + "loc": { + "start": { + "line": 39, + "column": 11 + }, + "end": { + "line": 39, + "column": 16 + } + } + }, + "range": [ + 758, + 769 + ], + "loc": { + "start": { + "line": 39, + "column": 5 + }, + "end": { + "line": 39, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "placeholder", + "range": [ + 776, + 787 + ], + "loc": { + "start": { + "line": 40, + "column": 5 + }, + "end": { + "line": 40, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 789, + 793 + ], + "loc": { + "start": { + "line": 40, + "column": 18 + }, + "end": { + "line": 40, + "column": 22 + } + } + }, + "range": [ + 776, + 793 + ], + "loc": { + "start": { + "line": 40, + "column": 5 + }, + "end": { + "line": 40, + "column": 22 + } + } + } + ], + "range": [ + 729, + 799 + ], + "loc": { + "start": { + "line": 37, + "column": 31 + }, + "end": { + "line": 41, + "column": 5 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 722, + 728 + ], + "loc": { + "start": { + "line": 37, + "column": 24 + }, + "end": { + "line": 37, + "column": 30 + } + } + }, + "range": [ + 713, + 728 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 713, + 800 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 41, + "column": 6 + } + } + }, + "range": [ + 702, + 800 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 41, + "column": 6 + } + } + }, + "range": [ + 702, + 801 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 906, + 912 + ], + "loc": { + "start": { + "line": 45, + "column": 6 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'eliza'", + "value": "eliza", + "range": [ + 914, + 921 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 21 + } + } + }, + "range": [ + 906, + 921 + ], + "loc": { + "start": { + "line": 45, + "column": 6 + }, + "end": { + "line": 45, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 929, + 933 + ], + "loc": { + "start": { + "line": 46, + "column": 6 + }, + "end": { + "line": 46, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "reply", + "range": [ + 935, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 12 + }, + "end": { + "line": 46, + "column": 17 + } + } + }, + "range": [ + 929, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 6 + }, + "end": { + "line": 46, + "column": 17 + } + } + } + ], + "range": [ + 898, + 947 + ], + "loc": { + "start": { + "line": 44, + "column": 72 + }, + "end": { + "line": 47, + "column": 6 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comment", + "range": [ + 870, + 877 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 51 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "placeholder", + "range": [ + 878, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 52 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "range": [ + 870, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 869, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 43 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + } + ], + "range": [ + 858, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 63 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 851, + 857 + ], + "loc": { + "start": { + "line": 44, + "column": 25 + }, + "end": { + "line": 44, + "column": 31 + } + } + }, + "range": [ + 842, + 857 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 842, + 890 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 64 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 891, + 897 + ], + "loc": { + "start": { + "line": 44, + "column": 65 + }, + "end": { + "line": 44, + "column": 71 + } + } + }, + "range": [ + 842, + 897 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 71 + } + } + }, + "optional": false, + "range": [ + 842, + 948 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "range": [ + 831, + 948 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "range": [ + 831, + 949 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 47, + "column": 8 + } + } + } + ], + "range": [ + 824, + 955 + ], + "loc": { + "start": { + "line": 43, + "column": 21 + }, + "end": { + "line": 48, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 818, + 955 + ], + "loc": { + "start": { + "line": 43, + "column": 15 + }, + "end": { + "line": 48, + "column": 5 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 957, + 960 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 968, + 974 + ], + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 24 + } + } + }, + "range": [ + 963, + 974 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 963, + 976 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 979, + 982 + ], + "loc": { + "start": { + "line": 48, + "column": 29 + }, + "end": { + "line": 48, + "column": 32 + } + } + }, + "range": [ + 963, + 982 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 32 + } + } + }, + "range": [ + 957, + 982 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 807, + 983 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 48, + "column": 33 + } + } + }, + "range": [ + 807, + 984 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 48, + "column": 34 + } + } + } + ], + "range": [ + 696, + 989 + ], + "loc": { + "start": { + "line": 36, + "column": 20 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 690, + 989 + ], + "loc": { + "start": { + "line": 36, + "column": 14 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 991, + 994 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 9 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 1002, + 1008 + ], + "loc": { + "start": { + "line": 49, + "column": 17 + }, + "end": { + "line": 49, + "column": 23 + } + } + }, + "range": [ + 997, + 1008 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 997, + 1010 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 1013, + 1016 + ], + "loc": { + "start": { + "line": 49, + "column": 28 + }, + "end": { + "line": 49, + "column": 31 + } + } + }, + "range": [ + 997, + 1016 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 31 + } + } + }, + "range": [ + 991, + 1016 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 31 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "optional": false, + "range": [ + 679, + 1017 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 49, + "column": 32 + } + } + }, + "range": [ + 679, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 49, + "column": 33 + } + } + } + ], + "range": [ + 476, + 1022 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 50, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 453, + 458 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 459, + 462 + ], + "loc": { + "start": { + "line": 23, + "column": 12 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + "range": [ + 453, + 462 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 467, + 474 + ], + "loc": { + "start": { + "line": 23, + "column": 20 + }, + "end": { + "line": 23, + "column": 27 + } + } + }, + "range": [ + 453, + 474 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 27 + } + } + }, + "range": [ + 449, + 1022 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 50, + "column": 3 + } + } + } + ], + "range": [ + 445, + 1025 + ], + "loc": { + "start": { + "line": 22, + "column": 31 + }, + "end": { + "line": 51, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 424, + 437 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + ], + "range": [ + 415, + 1025 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 51, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 1809, + 1822 + ], + "loc": { + "start": { + "line": 106, + "column": 20 + }, + "end": { + "line": 106, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 424, + 437 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 23 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 123, + 135 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "beforeUpdate", + "range": [ + 50, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 235, + 246 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "afterUpdate", + "range": [ + 64, + 75 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 333, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Eliza", + "range": [ + 17, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 388, + 393 + ], + "loc": { + "start": { + "line": 19, + "column": 27 + }, + "end": { + "line": 19, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 1652, + 1655 + ], + "loc": { + "start": { + "line": 98, + "column": 36 + }, + "end": { + "line": 98, + "column": 39 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 1667, + 1675 + ], + "loc": { + "start": { + "line": 99, + "column": 9 + }, + "end": { + "line": 99, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 1809, + 1822 + ], + "loc": { + "start": { + "line": 106, + "column": 20 + }, + "end": { + "line": 106, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 424, + 437 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 23 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 146, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 159, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 167, + 170 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 186, + 189 + ], + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 9, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 204, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 60 + }, + "end": { + "line": 9, + "column": 63 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 146, + 156 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 159, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 167, + 170 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 186, + 189 + ], + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 9, + "column": 45 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 204, + 207 + ], + "loc": { + "start": { + "line": 9, + "column": 60 + }, + "end": { + "line": 9, + "column": 63 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 261, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 289, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 261, + 271 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 109, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 289, + 292 + ], + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 99, + 102 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 8 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 500, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 494, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 29 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 494, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 487, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 34 + } + } + } + ], + "range": [ + 481, + 513 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 35 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 528, + 535 + ], + "loc": { + "start": { + "line": 25, + "column": 14 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 521, + 526 + ], + "loc": { + "start": { + "line": 25, + "column": 7 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "range": [ + 517, + 535 + ], + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 21 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "comments", + "range": [ + 540, + 548 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 573, + 579 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'user'", + "value": "user", + "range": [ + 581, + 587 + ], + "loc": { + "start": { + "line": 28, + "column": 12 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + "range": [ + 573, + 587 + ], + "loc": { + "start": { + "line": 28, + "column": 4 + }, + "end": { + "line": 28, + "column": 18 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "text", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + } + ], + "range": [ + 567, + 602 + ], + "loc": { + "start": { + "line": 27, + "column": 30 + }, + "end": { + "line": 30, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comments", + "range": [ + 551, + 559 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 560, + 566 + ], + "loc": { + "start": { + "line": 27, + "column": 23 + }, + "end": { + "line": 27, + "column": 29 + } + } + }, + "range": [ + 551, + 566 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 551, + 603 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + "range": [ + 540, + 603 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 30, + "column": 5 + } + } + }, + "range": [ + 540, + 604 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 30, + "column": 6 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 615, + 621 + ], + "loc": { + "start": { + "line": 32, + "column": 9 + }, + "end": { + "line": 32, + "column": 15 + } + } + }, + "range": [ + 609, + 621 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 622, + 627 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "range": [ + 609, + 627 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 630, + 632 + ], + "loc": { + "start": { + "line": 32, + "column": 24 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "range": [ + 609, + 632 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 26 + } + } + }, + "range": [ + 609, + 633 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 27 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 668, + 672 + ], + "loc": { + "start": { + "line": 34, + "column": 33 + }, + "end": { + "line": 34, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 658, + 667 + ], + "loc": { + "start": { + "line": 34, + "column": 23 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + "range": [ + 652, + 667 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + "optional": false, + "range": [ + 652, + 673 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 38 + } + } + }, + "range": [ + 644, + 673 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 38 + } + } + } + ], + "range": [ + 638, + 674 + ], + "loc": { + "start": { + "line": 34, + "column": 3 + }, + "end": { + "line": 34, + "column": 39 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 736, + 742 + ], + "loc": { + "start": { + "line": 38, + "column": 5 + }, + "end": { + "line": 38, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'eliza'", + "value": "eliza", + "range": [ + 744, + 751 + ], + "loc": { + "start": { + "line": 38, + "column": 13 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + "range": [ + 736, + 751 + ], + "loc": { + "start": { + "line": 38, + "column": 5 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 758, + 762 + ], + "loc": { + "start": { + "line": 39, + "column": 5 + }, + "end": { + "line": 39, + "column": 9 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'...'", + "value": "...", + "range": [ + 764, + 769 + ], + "loc": { + "start": { + "line": 39, + "column": 11 + }, + "end": { + "line": 39, + "column": 16 + } + } + }, + "range": [ + 758, + 769 + ], + "loc": { + "start": { + "line": 39, + "column": 5 + }, + "end": { + "line": 39, + "column": 16 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "placeholder", + "range": [ + 776, + 787 + ], + "loc": { + "start": { + "line": 40, + "column": 5 + }, + "end": { + "line": 40, + "column": 16 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 789, + 793 + ], + "loc": { + "start": { + "line": 40, + "column": 18 + }, + "end": { + "line": 40, + "column": 22 + } + } + }, + "range": [ + 776, + 793 + ], + "loc": { + "start": { + "line": 40, + "column": 5 + }, + "end": { + "line": 40, + "column": 22 + } + } + } + ], + "range": [ + 729, + 799 + ], + "loc": { + "start": { + "line": 37, + "column": 31 + }, + "end": { + "line": 41, + "column": 5 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 722, + 728 + ], + "loc": { + "start": { + "line": 37, + "column": 24 + }, + "end": { + "line": 37, + "column": 30 + } + } + }, + "range": [ + 713, + 728 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 713, + 800 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 41, + "column": 6 + } + } + }, + "range": [ + 702, + 800 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 41, + "column": 6 + } + } + }, + "range": [ + 702, + 801 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "author", + "range": [ + 906, + 912 + ], + "loc": { + "start": { + "line": 45, + "column": 6 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Literal", + "raw": "'eliza'", + "value": "eliza", + "range": [ + 914, + 921 + ], + "loc": { + "start": { + "line": 45, + "column": 14 + }, + "end": { + "line": 45, + "column": 21 + } + } + }, + "range": [ + 906, + 921 + ], + "loc": { + "start": { + "line": 45, + "column": 6 + }, + "end": { + "line": 45, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 929, + 933 + ], + "loc": { + "start": { + "line": 46, + "column": 6 + }, + "end": { + "line": 46, + "column": 10 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "reply", + "range": [ + 935, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 12 + }, + "end": { + "line": 46, + "column": 17 + } + } + }, + "range": [ + 929, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 6 + }, + "end": { + "line": 46, + "column": 17 + } + } + } + ], + "range": [ + 898, + 947 + ], + "loc": { + "start": { + "line": 44, + "column": 72 + }, + "end": { + "line": 47, + "column": 6 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comment", + "range": [ + 870, + 877 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 51 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "placeholder", + "range": [ + 878, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 52 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "range": [ + 870, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 869, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 43 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + } + ], + "range": [ + 858, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 63 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 851, + 857 + ], + "loc": { + "start": { + "line": 44, + "column": 25 + }, + "end": { + "line": 44, + "column": 31 + } + } + }, + "range": [ + 842, + 857 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 31 + } + } + }, + "optional": false, + "range": [ + 842, + 890 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 64 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "concat", + "range": [ + 891, + 897 + ], + "loc": { + "start": { + "line": 44, + "column": 65 + }, + "end": { + "line": 44, + "column": 71 + } + } + }, + "range": [ + 842, + 897 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 71 + } + } + }, + "optional": false, + "range": [ + 842, + 948 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "range": [ + 831, + 948 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 47, + "column": 7 + } + } + }, + "range": [ + 831, + 949 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 47, + "column": 8 + } + } + } + ], + "range": [ + 824, + 955 + ], + "loc": { + "start": { + "line": 43, + "column": 21 + }, + "end": { + "line": 48, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 818, + 955 + ], + "loc": { + "start": { + "line": 43, + "column": 15 + }, + "end": { + "line": 48, + "column": 5 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 957, + 960 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 968, + 974 + ], + "loc": { + "start": { + "line": 48, + "column": 18 + }, + "end": { + "line": 48, + "column": 24 + } + } + }, + "range": [ + 963, + 974 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 963, + 976 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 26 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "500", + "value": 500, + "range": [ + 979, + 982 + ], + "loc": { + "start": { + "line": 48, + "column": 29 + }, + "end": { + "line": 48, + "column": 32 + } + } + }, + "range": [ + 963, + 982 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 32 + } + } + }, + "range": [ + 957, + 982 + ], + "loc": { + "start": { + "line": 48, + "column": 7 + }, + "end": { + "line": 48, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 807, + 983 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 48, + "column": 33 + } + } + }, + "range": [ + 807, + 984 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 48, + "column": 34 + } + } + } + ], + "range": [ + 696, + 989 + ], + "loc": { + "start": { + "line": 36, + "column": 20 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 690, + 989 + ], + "loc": { + "start": { + "line": 36, + "column": 14 + }, + "end": { + "line": 49, + "column": 4 + } + } + }, + { + "type": "BinaryExpression", + "left": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 991, + 994 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 9 + } + } + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "left": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "random", + "range": [ + 1002, + 1008 + ], + "loc": { + "start": { + "line": 49, + "column": 17 + }, + "end": { + "line": 49, + "column": 23 + } + } + }, + "range": [ + 997, + 1008 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 997, + 1010 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 25 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "200", + "value": 200, + "range": [ + 1013, + 1016 + ], + "loc": { + "start": { + "line": 49, + "column": 28 + }, + "end": { + "line": 49, + "column": 31 + } + } + }, + "range": [ + 997, + 1016 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 31 + } + } + }, + "range": [ + 991, + 1016 + ], + "loc": { + "start": { + "line": 49, + "column": 6 + }, + "end": { + "line": 49, + "column": 31 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "optional": false, + "range": [ + 679, + 1017 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 49, + "column": 32 + } + } + }, + "range": [ + 679, + 1018 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 49, + "column": 33 + } + } + } + ], + "range": [ + 476, + 1022 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 50, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 453, + 458 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 459, + 462 + ], + "loc": { + "start": { + "line": 23, + "column": 12 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + "range": [ + 453, + 462 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 467, + 474 + ], + "loc": { + "start": { + "line": 23, + "column": 20 + }, + "end": { + "line": 23, + "column": 27 + } + } + }, + "range": [ + 453, + 474 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 27 + } + } + }, + "range": [ + 449, + 1022 + ], + "loc": { + "start": { + "line": 23, + "column": 2 + }, + "end": { + "line": 50, + "column": 3 + } + } + } + ], + "range": [ + 445, + 1025 + ], + "loc": { + "start": { + "line": 22, + "column": 31 + }, + "end": { + "line": 51, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 424, + 437 + ], + "loc": { + "start": { + "line": 22, + "column": 10 + }, + "end": { + "line": 22, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + ], + "range": [ + 415, + 1025 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 51, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 453, + 458 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 453, + 458 + ], + "loc": { + "start": { + "line": 23, + "column": 6 + }, + "end": { + "line": 23, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [ + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 500, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "range": [ + 494, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 29 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 494, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 487, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 668, + 672 + ], + "loc": { + "start": { + "line": 34, + "column": 33 + }, + "end": { + "line": 34, + "column": 37 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + } + ] + }, + { + "name": "reply", + "identifiers": [ + { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 668, + 672 + ], + "loc": { + "start": { + "line": 34, + "column": 33 + }, + "end": { + "line": 34, + "column": 37 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "transform", + "range": [ + 658, + 667 + ], + "loc": { + "start": { + "line": 34, + "column": 23 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + "range": [ + 652, + 667 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 32 + } + } + }, + "optional": false, + "range": [ + 652, + 673 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 38 + } + } + }, + "range": [ + 644, + 673 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "reply", + "range": [ + 935, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 12 + }, + "end": { + "line": 46, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 522, + 526 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 540, + 548 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 551, + 559 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 593, + 597 + ], + "loc": { + "start": { + "line": 29, + "column": 4 + }, + "end": { + "line": 29, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 668, + 672 + ], + "loc": { + "start": { + "line": 34, + "column": 33 + }, + "end": { + "line": 34, + "column": 37 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 487, + 491 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "reply", + "range": [ + 935, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 12 + }, + "end": { + "line": 46, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "comment", + "identifiers": [ + { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comment", + "range": [ + 870, + 877 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 51 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "placeholder", + "range": [ + 878, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 52 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "range": [ + 870, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 869, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 43 + }, + "end": { + "line": 44, + "column": 63 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + } + ], + "range": [ + 858, + 889 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 63 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comment", + "range": [ + 870, + 877 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comment", + "range": [ + 870, + 877 + ], + "loc": { + "start": { + "line": 44, + "column": 44 + }, + "end": { + "line": 44, + "column": 51 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comment", + "range": [ + 858, + 865 + ], + "loc": { + "start": { + "line": 44, + "column": 32 + }, + "end": { + "line": 44, + "column": 39 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "reply", + "range": [ + 935, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 12 + }, + "end": { + "line": 46, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "reply", + "range": [ + 935, + 940 + ], + "loc": { + "start": { + "line": 46, + "column": 12 + }, + "end": { + "line": 46, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "reply", + "range": [ + 644, + 649 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 34, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 494, + 499 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 540, + 548 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 551, + 559 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 609, + 614 + ], + "loc": { + "start": { + "line": 32, + "column": 3 + }, + "end": { + "line": 32, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 22, + "column": 24 + }, + "end": { + "line": 22, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 540, + 548 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 551, + 559 + ], + "loc": { + "start": { + "line": 27, + "column": 14 + }, + "end": { + "line": 27, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "eliza", + "range": [ + 652, + 657 + ], + "loc": { + "start": { + "line": 34, + "column": 17 + }, + "end": { + "line": 34, + "column": 22 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "eliza", + "range": [ + 321, + 326 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 702, + 710 + ], + "loc": { + "start": { + "line": 37, + "column": 4 + }, + "end": { + "line": 37, + "column": 12 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 713, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 831, + 839 + ], + "loc": { + "start": { + "line": 44, + "column": 5 + }, + "end": { + "line": 44, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comments", + "range": [ + 842, + 850 + ], + "loc": { + "start": { + "line": 44, + "column": 16 + }, + "end": { + "line": 44, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comments", + "range": [ + 348, + 356 + ], + "loc": { + "start": { + "line": 18, + "column": 5 + }, + "end": { + "line": 18, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "comment", + "identifiers": [ + { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "comments", + "range": [ + 1667, + 1675 + ], + "loc": { + "start": { + "line": 99, + "column": 9 + }, + "end": { + "line": 99, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "article", + "range": [ + 1692, + 1699 + ], + "loc": { + "start": { + "line": 100, + "column": 4 + }, + "end": { + "line": 100, + "column": 11 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 1700, + 1705 + ], + "loc": { + "start": { + "line": 100, + "column": 12 + }, + "end": { + "line": 100, + "column": 17 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comment", + "range": [ + 1707, + 1714 + ], + "loc": { + "start": { + "line": 100, + "column": 19 + }, + "end": { + "line": 100, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "author", + "range": [ + 1715, + 1721 + ], + "loc": { + "start": { + "line": 100, + "column": 27 + }, + "end": { + "line": 100, + "column": 33 + } + } + }, + "range": [ + 1707, + 1721 + ], + "loc": { + "start": { + "line": 100, + "column": 19 + }, + "end": { + "line": 100, + "column": 33 + } + } + }, + "range": [ + 1706, + 1722 + ], + "loc": { + "start": { + "line": 100, + "column": 18 + }, + "end": { + "line": 100, + "column": 34 + } + } + } + ], + "range": [ + 1700, + 1722 + ], + "loc": { + "start": { + "line": 100, + "column": 12 + }, + "end": { + "line": 100, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 1691, + 1723 + ], + "loc": { + "start": { + "line": 100, + "column": 3 + }, + "end": { + "line": 100, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t\t\t", + "range": [ + 1723, + 1728 + ], + "loc": { + "start": { + "line": 100, + "column": 35 + }, + "end": { + "line": 101, + "column": 4 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "span", + "range": [ + 1729, + 1733 + ], + "loc": { + "start": { + "line": 101, + "column": 5 + }, + "end": { + "line": 101, + "column": 9 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 1728, + 1734 + ], + "loc": { + "start": { + "line": 101, + "column": 4 + }, + "end": { + "line": 101, + "column": 10 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "comment", + "range": [ + 1735, + 1742 + ], + "loc": { + "start": { + "line": 101, + "column": 11 + }, + "end": { + "line": 101, + "column": 18 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "text", + "range": [ + 1743, + 1747 + ], + "loc": { + "start": { + "line": 101, + "column": 19 + }, + "end": { + "line": 101, + "column": 23 + } + } + }, + "range": [ + 1735, + 1747 + ], + "loc": { + "start": { + "line": 101, + "column": 11 + }, + "end": { + "line": 101, + "column": 23 + } + } + }, + "range": [ + 1734, + 1748 + ], + "loc": { + "start": { + "line": 101, + "column": 10 + }, + "end": { + "line": 101, + "column": 24 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1748, + 1755 + ], + "loc": { + "start": { + "line": 101, + "column": 24 + }, + "end": { + "line": 101, + "column": 31 + } + } + }, + "range": [ + 1728, + 1755 + ], + "loc": { + "start": { + "line": 101, + "column": 4 + }, + "end": { + "line": 101, + "column": 31 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t\t\t", + "range": [ + 1755, + 1759 + ], + "loc": { + "start": { + "line": 101, + "column": 31 + }, + "end": { + "line": 102, + "column": 3 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 1759, + 1769 + ], + "loc": { + "start": { + "line": 102, + "column": 3 + }, + "end": { + "line": 102, + "column": 13 + } + } + }, + "range": [ + 1691, + 1769 + ], + "loc": { + "start": { + "line": 100, + "column": 3 + }, + "end": { + "line": 102, + "column": 13 + } + } + } + ], + "else": null, + "range": [ + 1660, + 1779 + ], + "loc": { + "start": { + "line": 99, + "column": 2 + }, + "end": { + "line": 103, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comment", + "range": [ + 1707, + 1714 + ], + "loc": { + "start": { + "line": 100, + "column": 19 + }, + "end": { + "line": 100, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comment", + "range": [ + 1735, + 1742 + ], + "loc": { + "start": { + "line": 101, + "column": 11 + }, + "end": { + "line": 101, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "comment", + "range": [ + 1707, + 1714 + ], + "loc": { + "start": { + "line": 100, + "column": 19 + }, + "end": { + "line": 100, + "column": 26 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "comment", + "range": [ + 1735, + 1742 + ], + "loc": { + "start": { + "line": 101, + "column": 11 + }, + "end": { + "line": 101, + "column": 18 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "comment", + "range": [ + 1679, + 1686 + ], + "loc": { + "start": { + "line": 99, + "column": 21 + }, + "end": { + "line": 99, + "column": 28 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 679, + 689 + ], + "loc": { + "start": { + "line": 36, + "column": 3 + }, + "end": { + "line": 36, + "column": 13 + } + } + }, + "from": "block", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "setTimeout", + "range": [ + 807, + 817 + ], + "loc": { + "start": { + "line": 43, + "column": 4 + }, + "end": { + "line": 43, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 963, + 967 + ], + "loc": { + "start": { + "line": 48, + "column": 13 + }, + "end": { + "line": 48, + "column": 17 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "Math", + "range": [ + 997, + 1001 + ], + "loc": { + "start": { + "line": 49, + "column": 12 + }, + "end": { + "line": 49, + "column": 16 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json new file mode 100644 index 00000000..95c9626b --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json @@ -0,0 +1,2294 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "numbers", + "identifiers": [ + { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [ + { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Literal", + "raw": "3", + "value": 3, + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Literal", + "raw": "4", + "value": 4, + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 26 + } + } + } + ], + "range": [ + 24, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 14, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 65, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 111, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 134, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 185, + 192 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "name": "addNumber", + "identifiers": [ + { + "type": "Identifier", + "name": "addNumber", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "addNumber", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "numbers", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 86, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "range": [ + 78, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + "range": [ + 78, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 33 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "numbers", + "range": [ + 65, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "push", + "range": [ + 73, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 65, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 65, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 34 + } + } + }, + "range": [ + 65, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 35 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "numbers", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "numbers", + "range": [ + 111, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "range": [ + 101, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "range": [ + 101, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 20 + } + } + } + ], + "range": [ + 61, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "addNumber", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [ + 40, + 122 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "addNumber", + "range": [ + 237, + 246 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "addNumber", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "sum", + "identifiers": [ + { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + ], + "defs": [ + { + "type": "ComputedVariable", + "name": { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "node": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "n", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 39 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + ], + "range": [ + 149, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 9, + "column": 42 + }, + "end": { + "line": 9, + "column": 43 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "numbers", + "range": [ + 134, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "reduce", + "range": [ + 142, + 148 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "range": [ + 134, + 148 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 134, + 168 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 44 + } + } + }, + "range": [ + 128, + 168 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 44 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [ + 209, + 212 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 134, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 185, + 192 + ], + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [ + 209, + 212 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [ + 128, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 7 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "addNumber", + "range": [ + 237, + 246 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "addNumber", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 65, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 111, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 65, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 101, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "numbers", + "range": [ + 111, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "numbers", + "range": [ + 14, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "t", + "identifiers": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "n", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 39 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + ], + "range": [ + 149, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + } + } + ] + }, + { + "name": "n", + "identifiers": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "t", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "n", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 39 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "range": [ + 159, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + ], + "range": [ + 149, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 39 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "t", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "t", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 9, + "column": 39 + }, + "end": { + "line": 9, + "column": 40 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json new file mode 100644 index 00000000..5e2a8352 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json @@ -0,0 +1,1629 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "Incrementer", + "identifiers": [ + { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 333, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + } + ] + }, + { + "name": "Decrementer", + "identifiers": [ + { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 348, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + }, + { + "name": "Resetter", + "identifiers": [ + { + "type": "Identifier", + "name": "Resetter", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "node": { + "type": "ImportDefaultSpecifier", + "local": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 363, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ] + }, + { + "name": "count_value", + "identifiers": [ + { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "init": null, + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 258, + 269 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 313, + 324 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + } + ] + }, + { + "name": "unsubscribe", + "identifiers": [ + { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count_value", + "range": [ + 258, + 269 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "range": [ + 258, + 277 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "range": [ + 258, + 278 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + ], + "range": [ + 254, + 281 + ], + "loc": { + "start": { + "line": 9, + "column": 46 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 245, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + } + ], + "range": [ + 245, + 281 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 11, + "column": 2 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "count", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "subscribe", + "range": [ + 235, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "range": [ + 229, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 229, + 282 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "range": [ + 215, + 282 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 11, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "unsubscribe", + "range": [ + 215, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 7 + }, + "end": { + "line": 9, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 229, + 234 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 313, + 324 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 333, + 344 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Incrementer", + "range": [ + 55, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 348, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Decrementer", + "range": [ + 104, + 115 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 363, + 371 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "Resetter", + "range": [ + 153, + 161 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 245, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [ + 245, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count_value", + "range": [ + 258, + 269 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "range": [ + 258, + 277 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "range": [ + 258, + 278 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 22 + } + } + } + ], + "range": [ + 254, + 281 + ], + "loc": { + "start": { + "line": 9, + "column": 46 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 245, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + } + ], + "range": [ + 245, + 281 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 11, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 245, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 258, + 269 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [ + 272, + 277 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [ + 245, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 37 + }, + "end": { + "line": 9, + "column": 42 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count_value", + "range": [ + 258, + 269 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count_value", + "range": [ + 194, + 205 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 16 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json new file mode 100644 index 00000000..7c0d6b94 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json @@ -0,0 +1,882 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "decrement", + "identifiers": [ + { + "type": "Identifier", + "name": "decrement", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "decrement", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "range": [ + 87, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "update", + "range": [ + 80, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 74, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 74, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 74, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 70, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "decrement", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [ + 49, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "decrement", + "range": [ + 132, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "decrement", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "decrement", + "range": [ + 132, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "decrement", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "n", + "identifiers": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "range": [ + 87, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json new file mode 100644 index 00000000..584f544c --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json @@ -0,0 +1,882 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "increment", + "identifiers": [ + { + "type": "Identifier", + "name": "increment", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "increment", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "range": [ + 87, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "update", + "range": [ + 80, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 74, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 74, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 74, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 27 + } + } + } + ], + "range": [ + 70, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [ + 49, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [ + 132, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [ + 132, + 141 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "n", + "identifiers": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "operator": "+", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + ], + "range": [ + 87, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "n", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "n", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json new file mode 100644 index 00000000..82bf78d5 --- /dev/null +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json @@ -0,0 +1,571 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "local": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + }, + { + "name": "reset", + "identifiers": [ + { + "type": "Identifier", + "name": "reset", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "reset", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "count", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "set", + "range": [ + 76, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "range": [ + 70, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + "optional": false, + "range": [ + 70, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 70, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "range": [ + 66, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "reset", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "params": [], + "range": [ + 49, + 86 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "reset", + "range": [ + 116, + 121 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "reset", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "reset", + "range": [ + 116, + 121 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "reset", + "range": [ + 58, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 70, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json new file mode 100644 index 00000000..796fe41b --- /dev/null +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json @@ -0,0 +1,480 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "foo", + "identifiers": [ + { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 20, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 14, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + } + ] + }, + { + "name": "bar", + "identifiers": [ + { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "init": { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 38, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "range": [ + 32, + 43 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "foo", + "range": [ + 14, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "bar", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "bar", + "range": [ + 32, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json new file mode 100644 index 00000000..239c877d --- /dev/null +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json @@ -0,0 +1,1288 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "imported", + "identifiers": [ + { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "local": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$imported", + "range": [ + 160, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$imported", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$imported", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + }, + { + "name": "createStore", + "identifiers": [ + { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "local": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createStore", + "range": [ + 81, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createStore", + "range": [ + 132, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + } + ] + }, + { + "name": "writeOnly", + "identifiers": [ + { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createStore", + "range": [ + 81, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 81, + 94 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 69, + 94 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$writeOnly", + "range": [ + 97, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + } + ] + }, + { + "name": "readOnly", + "identifiers": [ + { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createStore", + "range": [ + 132, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "optional": false, + "range": [ + 132, + 145 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + "range": [ + 121, + 145 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 31 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$readOnly", + "range": [ + 148, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createStore", + "range": [ + 81, + 92 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$writeOnly", + "range": [ + 97, + 107 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "writeOnly", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 16 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createStore", + "range": [ + 132, + 143 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createStore", + "range": [ + 29, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$readOnly", + "range": [ + 148, + 157 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "readOnly", + "range": [ + 121, + 129 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$imported", + "range": [ + 160, + 169 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": false, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$imported", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$imported", + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "imported", + "range": [ + 19, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ] + } + ], + "through": [] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/src/parser/parser.ts b/tests/src/parser/parser.ts index 5459cbf2..747ff048 100644 --- a/tests/src/parser/parser.ts +++ b/tests/src/parser/parser.ts @@ -158,63 +158,50 @@ function checkLoc(ast: SvelteProgram, fileName: string, code: string) { ); assert.ok( node.range![0] < node.range![1], - `No range on "${node.type} line:${node.loc!.start.line} col:${ - node.loc!.start.column + `No range on "${node.type} line:${node.loc!.start.line} col:${node.loc!.start.column }" in ${fileName}`, ); if (parent) { assert.ok( parent.range![0] <= node.range![0], - `overlap range[0] on "${parent.type} line:${ - parent.loc!.start.line - } col:${parent.loc!.start.column}" > "${node.type} line:${ - node.loc!.start.line + `overlap range[0] on "${parent.type} line:${parent.loc!.start.line + } col:${parent.loc!.start.column}" > "${node.type} line:${node.loc!.start.line } col:${node.loc!.start.column}" in ${fileName}`, ); assert.ok( node.range![1] <= parent.range![1], - `overlap range[1] on "${parent.type} line:${ - parent.loc!.end.line - } col:${parent.loc!.end.column}" > "${node.type} line:${ - node.loc!.end.line + `overlap range[1] on "${parent.type} line:${parent.loc!.end.line + } col:${parent.loc!.end.column}" > "${node.type} line:${node.loc!.end.line } col:${node.loc!.end.column}" in ${fileName}`, ); assert.ok( parent.loc!.start.line <= node.loc!.start.line, - `overlap loc.start.line on "${parent.type} line:${ - parent.loc!.start.line - } col:${parent.loc!.start.column}" > "${node.type} line:${ - node.loc!.start.line + `overlap loc.start.line on "${parent.type} line:${parent.loc!.start.line + } col:${parent.loc!.start.column}" > "${node.type} line:${node.loc!.start.line } col:${node.loc!.start.column}" in ${fileName}`, ); if (parent.loc!.start.line === node.loc!.start.line) { assert.ok( parent.loc!.start.column <= node.loc!.start.column, - `overlap loc.start.column on "${parent.type} line:${ - parent.loc!.start.line - } col:${parent.loc!.start.column}" > "${node.type} line:${ - node.loc!.start.line + `overlap loc.start.column on "${parent.type} line:${parent.loc!.start.line + } col:${parent.loc!.start.column}" > "${node.type} line:${node.loc!.start.line } col:${node.loc!.start.column}" in ${fileName}`, ); } assert.ok( node.loc!.end.line <= parent.loc!.end.line, - `overlap loc.end.line on "${parent.type} line:${ - parent.loc!.end.line - } col:${parent.loc!.end.column}" > "${node.type} line:${ - node.loc!.end.line + `overlap loc.end.line on "${parent.type} line:${parent.loc!.end.line + } col:${parent.loc!.end.column}" > "${node.type} line:${node.loc!.end.line } col:${node.loc!.end.column}" in ${fileName}`, ); if (parent.loc!.end.line === node.loc!.end.line) { assert.ok( node.loc!.end.column <= parent.loc!.end.column, - `overlap loc.end.column on "${parent.type} line:${ - parent.loc!.end.line - } col:${parent.loc!.end.column}" > "${node.type} line:${ - node.loc!.end.line + `overlap loc.end.column on "${parent.type} line:${parent.loc!.end.line + } col:${parent.loc!.end.column}" > "${node.type} line:${node.loc!.end.line } col:${node.loc!.end.column}" in ${fileName}`, ); } diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 00cfe9ea..9b0cbd27 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -1,4 +1,5 @@ /* global require -- node */ +import { VERSION as SVELTE_VERSION } from "svelte/compiler"; import path from "path"; import fs from "fs"; import semver from "semver"; @@ -65,10 +66,14 @@ function* listupFixturesImpl(dir: string): Iterable<{ /input\.svelte$/u, "output.json", ); - const scopeFileName = inputFileName.replace( - /input\.svelte$/u, - "scope-output.json", - ); + const scopeFileName = SVELTE_VERSION.startsWith("5") + ? inputFileName.replace( + /input\.svelte$/u, + "scope-output-svelte5.json", + ) : inputFileName.replace( + /input\.svelte$/u, + "scope-output.json", + ); const typeFileName = inputFileName.replace( /input\.svelte$/u, "type-output.svelte", @@ -412,8 +417,8 @@ function nodeReplacer( type SvelteKeysType = { [key in SvelteNode["type"]]: T extends { type: key } - ? KeyofObject[] - : never; + ? KeyofObject[] + : never; }; type KeyofObject = { [key in keyof T]: key }[keyof T]; const nodeToKeys: SvelteKeysType = { From c9fe482ca8636c9e233dcb7a95f6374bd1a7403f Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 00:03:27 +0900 Subject: [PATCH 02/27] add expected files for svelte5 --- .../ast/$$slots-scope-output-svelte5.json | 30 +++++++++++++++++++ .../parser/ast/$var-scope-output-svelte5.json | 30 +++++++++++++++++++ ...within-component-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/attr01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/await01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/await02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...rite-less-code01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...lass-directive01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/comments01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../components01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../components02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../components03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../components04-scope-output-svelte5.json | 30 +++++++++++++++++++ ...n-with-expr-like-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ve-use-with-expr-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-style/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-style/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-style/03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-style/04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-tags/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../07-scope-output-svelte5.json | 30 +++++++++++++++++++ .../08-scope-output-svelte5.json | 30 +++++++++++++++++++ .../09-scope-output-svelte5.json | 30 +++++++++++++++++++ .../10-scope-output-svelte5.json | 30 +++++++++++++++++++ .../11-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-comments/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-comments/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-hash-if/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-hash-if/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-hash-if/03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-hash-each/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-hash-each/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-hash-each/03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-hash-each/04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-hash-each/05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-hash-each/06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../08-hash-key/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../08-hash-key/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../08-hash-key/03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../09-at-html/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../09-at-html/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../10-at-debug/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../10-at-debug/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../10-at-debug/03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../07-scope-output-svelte5.json | 30 +++++++++++++++++++ .../08-scope-output-svelte5.json | 30 +++++++++++++++++++ .../09-scope-output-svelte5.json | 30 +++++++++++++++++++ .../10-scope-output-svelte5.json | 30 +++++++++++++++++++ .../11-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-bind-this/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-bind-this/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02.1-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../07-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-bind-this/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-bind-this/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../13-slot/00/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../13-slot/00/02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-$$slots/01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ach-with-comment-scope-output-svelte5.json | 30 +++++++++++++++++++ ...empty-elements01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../hello-world01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../hello-world02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../hello-world03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../hello-world04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../hello-world05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../html-comments01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../dot-in-bind01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...nt-plugin-svelte-scope-output-svelte5.json | 30 +++++++++++++++++++ .../kit-demo-home-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/label01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../let-directive01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../let-directive02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../let-directive03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...che-with-comment-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ing-script-tag01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/props01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/props02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/props03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/props04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../pug/each/each01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...closing-template-scope-output-svelte5.json | 30 +++++++++++++++++++ ...th-destructure01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...th-destructure02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...th-destructure03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...th-destructure04-scope-output-svelte5.json | 30 +++++++++++++++++++ ...th-destructure05-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ive-with-store01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ive-with-store02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ctive-with-var01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ctive-with-var02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ctive-with-var03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../parser/ast/sass-scope-output-svelte5.json | 30 +++++++++++++++++++ .../script-in-style-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/script-tag-scope-output-svelte5.json | 30 +++++++++++++++++++ ...-closing-style01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../store-bindings-scope-output-svelte5.json | 30 +++++++++++++++++++ ...tyle-directive01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...tyle-directive02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...tyle-directive03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../style-global01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../style-global02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../style-in-script-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/style01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/style02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...t-with-bind-this-scope-output-svelte5.json | 30 +++++++++++++++++++ ...rly-spacing-test-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/this-attr01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/this-attr02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/this-attr03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/this-attr04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/this-attr05-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ailing-comment01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../actions-scope-output-svelte5.json | 30 +++++++++++++++++++ .../adding-data-scope-output-svelte5.json | 30 +++++++++++++++++++ ...eters-to-actions-scope-output-svelte5.json | 30 +++++++++++++++++++ ...s-to-transitions-scope-output-svelte5.json | 30 +++++++++++++++++++ .../animate-scope-output-svelte5.json | 30 +++++++++++++++++++ ...-subscriptions01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../await-blocks-scope-output-svelte5.json | 30 +++++++++++++++++++ .../tutorial/basics-scope-output-svelte5.json | 30 +++++++++++++++++++ .../bind-this-scope-output-svelte5.json | 30 +++++++++++++++++++ .../checkbox-inputs-scope-output-svelte5.json | 30 +++++++++++++++++++ .../class-shorthand-scope-output-svelte5.json | 30 +++++++++++++++++++ .../classes-scope-output-svelte5.json | 30 +++++++++++++++++++ ...onent-bindings01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...onent-bindings02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...mponent-events01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...mponent-events02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../congratulations-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ditable-bindings-scope-output-svelte5.json | 30 +++++++++++++++++++ .../context-api01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../context-api02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../context-api03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ss-transitions01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ss-transitions02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...m-js-transitions-scope-output-svelte5.json | 30 +++++++++++++++++++ .../custom-stores-scope-output-svelte5.json | 30 +++++++++++++++++++ .../debug01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../debug02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...eclaring-props01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...eclaring-props02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...default-values01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...default-values02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...rred-transitions-scope-output-svelte5.json | 30 +++++++++++++++++++ .../derived-stores-scope-output-svelte5.json | 30 +++++++++++++++++++ .../dimensions-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ent-forwarding01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ent-forwarding02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../dom-events-scope-output-svelte5.json | 30 +++++++++++++++++++ ...namic-attributes-scope-output-svelte5.json | 30 +++++++++++++++++++ ...h-block-bindings-scope-output-svelte5.json | 30 +++++++++++++++++++ .../each-blocks01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../each-blocks02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../else-blocks-scope-output-svelte5.json | 30 +++++++++++++++++++ ...else-if-blocks01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...else-if-blocks02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ent-forwarding01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ent-forwarding02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ent-forwarding03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ent-forwarding04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../event-modifiers-scope-output-svelte5.json | 30 +++++++++++++++++++ .../group-inputs-scope-output-svelte5.json | 30 +++++++++++++++++++ .../html-tags01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../html-tags02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../if-blocks-scope-output-svelte5.json | 30 +++++++++++++++++++ .../in-and-out-scope-output-svelte5.json | 30 +++++++++++++++++++ .../inline-handlers-scope-output-svelte5.json | 30 +++++++++++++++++++ ...eyed-each-blocks-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ocal-transitions-scope-output-svelte5.json | 30 +++++++++++++++++++ .../media-elements-scope-output-svelte5.json | 30 +++++++++++++++++++ ...module-exports01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...module-exports02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...-select-bindings-scope-output-svelte5.json | 30 +++++++++++++++++++ .../named-slots01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../named-slots02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ted-components01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ted-components02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...numeric-inputs01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...numeric-inputs02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ondestroy-scope-output-svelte5.json | 30 +++++++++++++++++++ .../onmount-scope-output-svelte5.json | 30 +++++++++++++++++++ ...optional-slots01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...optional-slots02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...optional-slots03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...tive-assignments-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ive-declarations-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ctive-statements-scope-output-svelte5.json | 30 +++++++++++++++++++ .../readable-stores-scope-output-svelte5.json | 30 +++++++++++++++++++ .../select-bindings-scope-output-svelte5.json | 30 +++++++++++++++++++ .../sharing-code01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../sharing-code02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...slot-fallbacks01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...slot-fallbacks02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../slot-props01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../slot-props02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../slot-props03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../slots01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../slots02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../spread-props01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../spread-props02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../spread-props03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../tutorial/spring-scope-output-svelte5.json | 30 +++++++++++++++++++ .../styling01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../styling02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-body-scope-output-svelte5.json | 30 +++++++++++++++++++ ...svelte-component-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-document-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-element-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-fragment-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-head-scope-output-svelte5.json | 30 +++++++++++++++++++ ...svelte-options01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...svelte-options02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...svelte-options03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-self01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-self02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-self03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...-window-bindings-scope-output-svelte5.json | 30 +++++++++++++++++++ .../svelte-window-scope-output-svelte5.json | 30 +++++++++++++++++++ .../text-inputs01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../text-inputs02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../textarea-inputs-scope-output-svelte5.json | 30 +++++++++++++++++++ .../tutorial/tick-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ransition-events-scope-output-svelte5.json | 30 +++++++++++++++++++ .../transition-scope-output-svelte5.json | 30 +++++++++++++++++++ .../tweened-scope-output-svelte5.json | 30 +++++++++++++++++++ .../tutorial/update-scope-output-svelte5.json | 30 +++++++++++++++++++ ...rays-and-objects-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ritable-stores01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ritable-stores02-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ritable-stores03-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ritable-stores04-scope-output-svelte5.json | 30 +++++++++++++++++++ ...nown-directive01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...write-only-store-scope-output-svelte5.json | 30 +++++++++++++++++++ tests/src/parser/eslint-rules.ts | 9 ++++-- 325 files changed, 9727 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json index 8aa15e1c..673549f1 100644 --- a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json index 13a91319..52f7b07a 100644 --- a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json index 160b8416..c8ae6c38 100644 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json index 4f004ffa..c3dbd581 100644 --- a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json index b170929d..c0f0ebe9 100644 --- a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json index 6704dac2..0bc4c394 100644 --- a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json index c584f6b7..ba15bda3 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json index 75d70de4..13050424 100644 --- a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json index 17e5e2d9..2a0a2128 100644 --- a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json index 17e5e2d9..2a0a2128 100644 --- a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json index 91f06b95..ab70be02 100644 --- a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json index f00b0217..8f4748e9 100644 --- a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json index 4547a110..12225d9c 100644 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json index b8a8cfb5..d87484c5 100644 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json index 8aa93825..eff63b2b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json index c694e3f0..527cf046 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json index f064f431..45cb227d 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json index abb9fc00..c3551a31 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json index abb9fc00..c3551a31 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json index ef8a2d57..af23cc7d 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json index 2c8006cb..96844bfb 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json index 3cdcc951..b403e0ef 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json index c8e221c7..bfd7f5e3 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json index dfaf5a6f..d03ae69e 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json index 3ee5c6eb..fcbbbf3e 100644 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json index 0f9803a2..c6a1ab3d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json index 77293f06..807785b8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json index 5b3e5d75..bc595ac7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json index 78ba1afa..f843bd67 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json index 6feba977..bd4f854a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json index 977fab12..1e760ff1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json index 73592d5d..b0f85e07 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json index 39dcd8a3..2d300aae 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json index 781f2bad..d567849b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json @@ -42,6 +42,36 @@ "resolved": null } ] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json index 73d599b9..c1e4bc99 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json index ba08f3d0..da7e42dd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json index ee12a1ef..b83b22e8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json index be8c1387..7d20324d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json index 6e5bedff..ff0added 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json index 23b52e16..6b7932b4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json index 4cf23501..eb7001f1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json index 199d1d2d..0806d4b7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json index 567b593c..260f6771 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json index 2ff71892..86f54016 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json index fc368aa3..b39fa326 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json index eeed2e9d..70a353d3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json index af9742f9..90e63b27 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json index 75a0e1ef..410df4db 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json index 737039cd..4e6a8f05 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json index bae39a01..74c28fa9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json index 494496fd..6eb86596 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json index 35082588..5caac2fe 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json index 9170b185..1eee26b9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json index 098c8933..4b882ce4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json index 5e4c6f4e..af8a524c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json index e2252881..f0e465c2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json index efcebe07..47d03c4f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json index 1f125b60..930e32ef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json index a948a091..b55c7569 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json index da97d137..4ff9185f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json index 0b78d9c5..04a7a76a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json index 5b6486ef..1285483c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json index 50d8ac5c..27a6e988 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json index 8b1f7a3b..92149fe4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json index 7c0a785e..04f45e44 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json index d5a2f57e..438aaa3c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json index 4612fa74..aa686834 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json index 88c440ef..8641abdd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json index eb594d4d..8844edec 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json index a324fcdd..584430a8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json index b44c4c88..e309087c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json index 96f2281a..70bbcadf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json index bea31b0e..a5dce38e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json index bea31b0e..a5dce38e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json index 6118b7f7..45c1e649 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json index 4e52f1e8..40285ac4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json index 72b271b2..2c844be0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json index 765fa07c..7a15d82b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json index ef4ee42e..f0ba7760 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json index c593403e..cf3278b8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json index 99fab42b..a7ec7460 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json index 7f9e0483..19e842f1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json index b24e5b1f..907d5cc0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json index 3fed4aeb..2f397f17 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json index 56146b73..fea43fde 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json index 7bad5ae1..8b795c32 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json index 6b8a9a75..33b47392 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json index 13267585..2c394519 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json index 1f467c7a..2e67a917 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json index f22fdb21..72bbde39 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json index f22fdb21..72bbde39 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json index abff00cc..32af4568 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json index cf4d0821..6dd03101 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json index 7f9dd719..d51a8d5a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json index 47c49438..c7d4cb06 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json index 0f591c22..bec1c1cf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json index a1c2fa57..72fddc7c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json index 56a16148..8969f069 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json index 5605059a..66623446 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json index fbbb5e42..45f3de32 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json index 381c2ca8..0f63ed38 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json index 7141aab6..65418939 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json index 699043a7..e2277126 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json index 7a9359d0..4a981aae 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json index be31776c..fc061114 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json index 49859bb0..c75553c7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json index 360c7fdd..bbcdc522 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json index 9845c2d8..378dc4ff 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json index f76e8881..c162c11a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json index 606b932b..211fc75b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json index d6bc558d..fb3fd861 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json index edecea97..66f96972 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json index a23f7593..39523a9c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json index bcd9acb3..dd690bb9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json index e77046d6..ed632d37 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json index 99ef9273..6accfc46 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json index b815e9e5..254773f0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json index edb0ab26..d7355484 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json index 437f8639..39f734a8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json index fc73df75..ae2e9cb0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json index ff79b4f9..46ae567e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json index 833f1994..d57aad1f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json index b7452abe..e4b9ebc5 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json index e20a2ab1..709b59cf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json index b91f71ce..0939605a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json index 0f0e4448..5d1a05b2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json index 7e51c90e..1a1a1e4f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json index 223b3770..73722a53 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json index e3be4aef..cfb4d937 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json index 0b12bfe2..2b4f70cd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json index 2dbb0d2f..4847b237 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json index 34802cb7..2d99361b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json index e77046d6..ed632d37 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json index 6cf870a5..13e6a91d 100644 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json index 6947f25c..46e96fe8 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json index 9dceaa1d..f9f3b516 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json index 882f9421..b4d0dab2 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json index 894f218b..67643eaa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json index dcf6176a..e03a07fa 100644 --- a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json index e5f380e1..5fe113cc 100644 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json index 6d635a13..0dd91cb4 100644 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json index f418d6b1..8583c557 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json index 1518de1c..b51dc638 100644 --- a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json index d5b190b7..1f238128 100644 --- a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json index 98dd33c3..a23f0444 100644 --- a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json index 8715fb62..af682329 100644 --- a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json index cfa04a30..2e095a62 100644 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json index ef580033..a65ca982 100644 --- a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json index 14725437..0f4c42aa 100644 --- a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json index 26001b22..c6c13a11 100644 --- a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json index 26001b22..c6c13a11 100644 --- a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json index d60909e3..df1d684e 100644 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json index b6c16cf5..2da89d4d 100644 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json index 41a08566..3e973d09 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json index 61297f5f..545f3c68 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json index 2ba87d16..67fc4df6 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json index 7d5e035f..0b51f1a1 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json index ccd58aa2..b00da738 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json index 7b0e08a4..e3ea65b7 100644 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json index a6953e56..491dcfd0 100644 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json index a1187832..70b27a67 100644 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json index 0ce45b7b..f1c8d085 100644 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json index 416b0c2e..dd3a4ea2 100644 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json index f687cfa0..9a318f3b 100644 --- a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json index e4c88be2..b2cadb59 100644 --- a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json index c6111112..4e5ca43c 100644 --- a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json index df77d617..8be3c32c 100644 --- a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json index dde610ce..3cbffdf5 100644 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json index d7a9f934..58e9ef88 100644 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json index b728cf65..74955551 100644 --- a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json index d6e06927..8c61b3c3 100644 --- a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json index 6507504a..1a36ee04 100644 --- a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json index a7744f2c..9f943f84 100644 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json index 8e268574..4ab995a6 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json index 6947f25c..46e96fe8 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json index 478f1ddf..b97f9daf 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json index b8fd24ef..ea6aae9f 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json index 4c6db18a..72f4b5e7 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json index 22c39e5a..b50b49b9 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json index f49f0151..3b06752b 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json index 7034920d..aa286c67 100644 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json index 3f484d38..c4bfa0d1 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json index 80dd0940..5779f6ed 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json index 4cbabbe0..93f027b8 100644 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json index 4d4d4df8..a8d313ab 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json index 3949b715..26140a9f 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json index 2f6834ad..096352ed 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json index 802d02d1..520e306f 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json index ecba3001..08a2ec32 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json index 7d818404..8a66d688 100644 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json index fa150e89..dc8fee14 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json index 7f4ea7b5..9b752a12 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json index 94abca35..5ce8b58e 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json index d9dfaad7..c67b0d06 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json index 22ba8855..a6ad99c6 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json index f8f2fd1c..4ad1f6b6 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json index b4383e8b..32229d1a 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json index 49ccd447..4e878fb9 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json index abf9aefd..3ec8116f 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json index 045eb8b9..c31a8d5d 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json index c2e1562f..07c48bbc 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json index 045eb8b9..c31a8d5d 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json index 3ff37e2b..0487c083 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json index de8ad023..f2f8b624 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json index 95cc1601..e3a07296 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json index 9694da1d..e54bcc78 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json index 9b6180d3..6fd75e21 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json index d444e2c1..b9a04aeb 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json index 826fddf0..69aaebdd 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json index b68a286f..cb96922e 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json index 2ff11068..c9c643a2 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json index 31e48a68..39bc0800 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json index 103d301c..0282a0c4 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json index 0750fe26..5ab91c95 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json index b6d37d55..228ddae8 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json index 3148c422..8a89f21f 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json index 802d02d1..520e306f 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json index d2b520ce..826f25a6 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json index 247f30d0..ddb7bae8 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json index 0c32ef75..512ec7e3 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json index 7e087144..0015eaf6 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json index 50465ea7..3a667796 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json index 9352f3d3..a4d7b8f6 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json index 60ed4d1c..5511b08b 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json index 36b838c1..1c40e5a2 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json index 7b083aec..d14c7bc2 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json index 29606a3d..e790a128 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json index af378fb0..e1c7a138 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json index 90b0c54a..231d7bf1 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json index d481bb78..5a27f922 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json index e277ad25..3a433098 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json index 02e1e272..1ab1442e 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json index fd1807df..abb34b09 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json index fbd69ca8..dbe14f8d 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json index 6d748fad..5d8660e6 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json index 1341eafc..0dcb13a6 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json index d03483ce..25331dd1 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json index f5fc6fca..72b0d3e8 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json index 5495b9f4..c5cf427c 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json index 9fa49c89..409d9361 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json index 0ad83ba1..aa683a62 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json @@ -65,6 +65,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json index 1975ce7d..61f318c4 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json index 314a82cd..1bdd20c0 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json index 73bf0370..8193ed1e 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json index a153a661..47db0d03 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json index 7df7d267..af03e5cf 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json index 8aea8a11..2a533e00 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json index c730ce47..8c8e2c3c 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json index d42ad87c..10df24eb 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json index a1c47e26..6b62e0b3 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json index dbcfec92..ff33861e 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json index 569c1948..9c3ac71e 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json index 0f871208..2bcbc4fe 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json index deed7fcd..ccaaf775 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json index 618f808d..faa49206 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json index 21f1f680..12b40a8b 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json index c39f7097..8cc22f29 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json index 9bb07114..eb9608a8 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json index a3748aef..5de76ff9 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json index 8e6c9ce7..f7fd8ea8 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json index 1ffb9b82..3e1b929d 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json index 07f410db..192a2d80 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json index aa5d1b86..214fd6c1 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json index c3e51915..4a1358cd 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json index b73251da..74b4083e 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json index 66141254..09e7dd38 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json index 4c39c697..c05d8eca 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json index b9abbfc6..3f9cee0a 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json index 9f544b73..f152a4e2 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json index 0bd63273..ee2640d0 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json index 19ee68bb..c3606b93 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json index 4a5b1da7..b5e413cd 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json index 814aebfa..9d188d72 100644 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json index cd8da317..ac4bbc96 100644 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json index 91b57371..a79784f4 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json index 65393d1c..c20e0036 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json index ed9f8f1d..57e1d786 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json index 279f54e3..fb693c1a 100644 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json index 95c9626b..f708a62c 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json index 5e2a8352..23a92ab1 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json index 7c0d6b94..4fe41975 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json index 584f544c..eef95c8d 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json index 82bf78d5..fe3cfe5c 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json index 796fe41b..e469cab1 100644 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json index 239c877d..af2faece 100644 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/src/parser/eslint-rules.ts b/tests/src/parser/eslint-rules.ts index ae8fa02f..570a426c 100644 --- a/tests/src/parser/eslint-rules.ts +++ b/tests/src/parser/eslint-rules.ts @@ -81,8 +81,13 @@ describe("svelte-eslint-parser with ESLint rules", () => { null, 2, ); - const output = fs.readFileSync(outputFileName, "utf8"); - assert.strictEqual(messagesJson, output); + + if (!fs.existsSync(outputFileName)) { + assert.strictEqual(messagesJson, "[]"); + } else { + const output = fs.readFileSync(outputFileName, "utf8"); + assert.strictEqual(messagesJson, output); + } } }); } From 82b0679264e50e21b60dae43443f78b3c4ecff29 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 00:04:21 +0900 Subject: [PATCH 03/27] register globals --- explorer-v2/package.json | 2 +- src/parser/globals.ts | 5 ++ src/parser/index.ts | 6 +-- src/parser/typescript/analyze/index.ts | 68 +++++++++++++++++++++++--- 4 files changed, 68 insertions(+), 13 deletions(-) create mode 100644 src/parser/globals.ts diff --git a/explorer-v2/package.json b/explorer-v2/package.json index 645e6437..c7b58224 100644 --- a/explorer-v2/package.json +++ b/explorer-v2/package.json @@ -18,7 +18,7 @@ "eslint-scope": "^7.0.0", "esquery": "^1.5.0", "pako": "^2.0.3", - "svelte": "^4.0.0", + "svelte": "^5.0.0-next.2", "svelte-eslint-parser": "link:..", "tslib": "^2.5.0" }, diff --git a/src/parser/globals.ts b/src/parser/globals.ts new file mode 100644 index 00000000..e55219c7 --- /dev/null +++ b/src/parser/globals.ts @@ -0,0 +1,5 @@ +import { VERSION as SVELTE_VERSION } from "svelte/compiler"; + +const globalsForSvelte4: Readonly = ["$$slots", "$$props", "$$restProps"] as const; +export const globalsForSvelte5 = ["$state", "$derived", "$effect", "$effect.pre", "$props"] as const; +export const globals = SVELTE_VERSION.startsWith("5") ? [...globalsForSvelte4, ...globalsForSvelte5] : globalsForSvelte4; diff --git a/src/parser/index.ts b/src/parser/index.ts index 449b9959..9fabe327 100644 --- a/src/parser/index.ts +++ b/src/parser/index.ts @@ -7,7 +7,6 @@ import type { SvelteStyleElement, Token, } from "../ast"; -import { VERSION as SVELTE_VERSION } from "svelte/compiler"; import type { Program } from "estree"; import type { ScopeManager } from "eslint-scope"; import { Variable } from "eslint-scope"; @@ -33,10 +32,7 @@ import { styleNodeLoc, styleNodeRange, } from "./style-context"; - -const globalsForSvelte4: Readonly = ["$$slots", "$$props", "$$restProps"]; -const globalsForSvelte5: Readonly = ["$state", "$derived", "$effect", "$effect.pre", "$props"]; -const globals = SVELTE_VERSION.startsWith("5") ? globalsForSvelte5 : globalsForSvelte4; +import { globals } from './globals'; export { StyleContext, diff --git a/src/parser/typescript/analyze/index.ts b/src/parser/typescript/analyze/index.ts index 657ce02a..0d93b169 100644 --- a/src/parser/typescript/analyze/index.ts +++ b/src/parser/typescript/analyze/index.ts @@ -16,12 +16,12 @@ import { VirtualTypeScriptContext } from "../context"; import type { TSESParseForESLintResult } from "../types"; import type ESTree from "estree"; import type { SvelteAttribute, SvelteHTMLElement } from "../../../ast"; +import { globalsForSvelte5, globals } from '../../../parser/globals'; export type AnalyzeTypeScriptContext = { slots: Set; }; -const RESERVED_NAMES = new Set(["$$props", "$$restProps", "$$slots"]); /** * Analyze TypeScript source code. * Generate virtual code to provide correct type information for Svelte store reference namess and scopes. @@ -75,8 +75,8 @@ function analyzeStoreReferenceNames( if ( // Begin with `$`. reference.identifier.name.startsWith("$") && - // Ignore it is a reserved variable. - !RESERVED_NAMES.has(reference.identifier.name) && + // Ignore globals + !globals.includes(reference.identifier.name) && // Ignore if it is already defined. !programScope.set.has(reference.identifier.name) ) { @@ -209,15 +209,69 @@ function analyzeDollarDollarVariables( appendDeclareVirtualScript( "$$slots", - `Record<${ - nameTypes.size > 0 ? [...nameTypes].join(" | ") : "any" + `Record<${nameTypes.size > 0 ? [...nameTypes].join(" | ") : "any" }, boolean>`, ); } + for (const svelte5Global of globalsForSvelte5) { + switch (svelte5Global) { + case "$state": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareVirtualScript(svelte5Global, '(initial: T): T', "function"); + appendDeclareVirtualScript(svelte5Global, '(): T | undefined', "function"); + } + break; + } + case "$derived": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareVirtualScript(svelte5Global, '(expression: T): T', "function"); + } + break; + } + case "$effect": + case "$effect.pre": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareVirtualScript(svelte5Global, '(fn: () => void | (() => void)): void', "function"); + } + break; + } + case "$props": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareVirtualScript(svelte5Global, '(): T', "function"); + } + break; + } + default: { + const _: never = svelte5Global; + throw Error(`Unknown global: ${_}`) + } + } + } + /** Append declare virtual script */ - function appendDeclareVirtualScript(name: string, type: string) { - ctx.appendVirtualScript(`declare let ${name}: ${type};`); + function appendDeclareVirtualScript(name: string, type: string, letOrFunction: 'let' | 'function' = "let") { + if (letOrFunction === 'let') { + ctx.appendVirtualScript(`declare let ${name}: ${type};`); + } else { + ctx.appendVirtualScript(`declare function ${name}${type};`); + } ctx.restoreContext.addRestoreStatementProcess((node, result) => { if ( node.type !== "VariableDeclaration" || From e5ae1735da4e9ceecb55fa56c102714432e06900 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 00:05:38 +0900 Subject: [PATCH 04/27] remove unnecessary files --- explorer-v2/a4.json | 283 ------------------------------------------ explorer-v2/a5.json | 293 -------------------------------------------- 2 files changed, 576 deletions(-) delete mode 100644 explorer-v2/a4.json delete mode 100644 explorer-v2/a5.json diff --git a/explorer-v2/a4.json b/explorer-v2/a4.json deleted file mode 100644 index 072d0c1c..00000000 --- a/explorer-v2/a4.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "type": "Program", - "body": [ - { - "type": "SvelteElement", - "kind": "special", - "name": { - "type": "SvelteName", - "name": "svelte:element" - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "class" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "foo" - } - ] - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "this" - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "input" - } - ] - }, - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "type" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "number" - } - ] - } - ], - "selfClosing": true - }, - "children": [], - "endTag": null - }, - { - "type": "SvelteText", - "value": "\n" - }, - { - "type": "SvelteElement", - "kind": "special", - "name": { - "type": "SvelteName", - "name": "svelte:element" - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "class" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "foo" - } - ] - }, - { - "type": "SvelteSpecialDirective", - "kind": "this", - "key": { - "type": "SvelteSpecialDirectiveKey" - }, - "expression": { - "type": "Literal", - "value": "input", - "raw": "\"input\"" - } - }, - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "type" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "number" - } - ] - } - ], - "selfClosing": true - }, - "children": [], - "endTag": null - } - ], - "comments": [], - "sourceType": "module", - "tokens": [ - { - "type": "Punctuator", - "value": "<" - }, - { - "type": "HTMLIdentifier", - "value": "svelte:element" - }, - { - "type": "HTMLIdentifier", - "value": "class" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "foo" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLIdentifier", - "value": "this" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "input" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLIdentifier", - "value": "type" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "number" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "Punctuator", - "value": "/" - }, - { - "type": "Punctuator", - "value": ">" - }, - { - "type": "HTMLText", - "value": "\n" - }, - { - "type": "Punctuator", - "value": "<" - }, - { - "type": "HTMLIdentifier", - "value": "svelte:element" - }, - { - "type": "HTMLIdentifier", - "value": "class" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "foo" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLIdentifier", - "value": "this" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "{" - }, - { - "type": "String", - "value": "\"input\"" - }, - { - "type": "Punctuator", - "value": "}" - }, - { - "type": "HTMLIdentifier", - "value": "type" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "number" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "Punctuator", - "value": "/" - }, - { - "type": "Punctuator", - "value": ">" - } - ] -} diff --git a/explorer-v2/a5.json b/explorer-v2/a5.json deleted file mode 100644 index 59ac5b12..00000000 --- a/explorer-v2/a5.json +++ /dev/null @@ -1,293 +0,0 @@ -{ - "type": "Program", - "body": [ - { - "type": "SvelteElement", - "kind": "special", - "name": { - "type": "SvelteName", - "name": "svelte:element" - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "class" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "foo" - } - ] - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "this" - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "input" - } - ] - }, - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "type" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "number" - } - ] - } - ], - "selfClosing": true - }, - "children": [], - "endTag": null - }, - { - "type": "SvelteText", - "value": "\n" - }, - { - "type": "SvelteElement", - "kind": "special", - "name": { - "type": "SvelteName", - "name": "svelte:element" - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "class" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "foo" - } - ] - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "this" - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "input" - } - ] - }, - { - "type": "SvelteAttribute", - "boolean": false, - "key": { - "type": "SvelteName", - "name": "type" - }, - "value": [ - { - "type": "SvelteLiteral", - "value": "number" - } - ] - } - ], - "selfClosing": true - }, - "children": [], - "endTag": null - } - ], - "comments": [], - "sourceType": "module", - "tokens": [ - { - "type": "Punctuator", - "value": "<" - }, - { - "type": "HTMLIdentifier", - "value": "svelte:element" - }, - { - "type": "HTMLIdentifier", - "value": "class" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "foo" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLIdentifier", - "value": "this" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "input" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLIdentifier", - "value": "type" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "number" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "Punctuator", - "value": "/" - }, - { - "type": "Punctuator", - "value": ">" - }, - { - "type": "HTMLText", - "value": "\n" - }, - { - "type": "Punctuator", - "value": "<" - }, - { - "type": "HTMLIdentifier", - "value": "svelte:element" - }, - { - "type": "HTMLIdentifier", - "value": "class" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "foo" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLIdentifier", - "value": "this" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "{" - }, - { - "type": "HTMLText", - "value": "\"inpu" - }, - { - "type": "Punctuator", - "value": "t" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "Punctuator", - "value": "}" - }, - { - "type": "HTMLIdentifier", - "value": "type" - }, - { - "type": "Punctuator", - "value": "=" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "HTMLText", - "value": "number" - }, - { - "type": "Punctuator", - "value": "\"" - }, - { - "type": "Punctuator", - "value": "/" - }, - { - "type": "Punctuator", - "value": ">" - } - ] -} From c72d06391dfd0fc5e8bbf3b25c2fbf6b2a5c895b Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 00:06:30 +0900 Subject: [PATCH 05/27] add changeset --- .changeset/blue-pets-play.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/blue-pets-play.md diff --git a/.changeset/blue-pets-play.md b/.changeset/blue-pets-play.md new file mode 100644 index 00000000..873b8bc5 --- /dev/null +++ b/.changeset/blue-pets-play.md @@ -0,0 +1,5 @@ +--- +"svelte-eslint-parser": minor +--- + +feat: Support runes From cacef0214068b9cfb33a240bb2d3fbde8cec2398 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 00:07:58 +0900 Subject: [PATCH 06/27] format --- src/parser/globals.ts | 18 +++++++++-- src/parser/index.ts | 20 ++++++------- src/parser/typescript/analyze/index.ts | 41 +++++++++++++++++++------- tests/src/parser/parser.ts | 39 ++++++++++++++++-------- tests/src/parser/test-utils.ts | 13 +++----- 5 files changed, 86 insertions(+), 45 deletions(-) diff --git a/src/parser/globals.ts b/src/parser/globals.ts index e55219c7..26cc2e2e 100644 --- a/src/parser/globals.ts +++ b/src/parser/globals.ts @@ -1,5 +1,17 @@ import { VERSION as SVELTE_VERSION } from "svelte/compiler"; -const globalsForSvelte4: Readonly = ["$$slots", "$$props", "$$restProps"] as const; -export const globalsForSvelte5 = ["$state", "$derived", "$effect", "$effect.pre", "$props"] as const; -export const globals = SVELTE_VERSION.startsWith("5") ? [...globalsForSvelte4, ...globalsForSvelte5] : globalsForSvelte4; +const globalsForSvelte4: Readonly = [ + "$$slots", + "$$props", + "$$restProps", +] as const; +export const globalsForSvelte5 = [ + "$state", + "$derived", + "$effect", + "$effect.pre", + "$props", +] as const; +export const globals = SVELTE_VERSION.startsWith("5") + ? [...globalsForSvelte4, ...globalsForSvelte5] + : globalsForSvelte4; diff --git a/src/parser/index.ts b/src/parser/index.ts index 9fabe327..5898b13b 100644 --- a/src/parser/index.ts +++ b/src/parser/index.ts @@ -32,7 +32,7 @@ import { styleNodeLoc, styleNodeRange, } from "./style-context"; -import { globals } from './globals'; +import { globals } from "./globals"; export { StyleContext, @@ -102,16 +102,16 @@ export function parseForESLint( const scripts = ctx.sourceCode.scripts; const resultScript = ctx.isTypeScript() ? parseTypeScript( - scripts.getCurrentVirtualCodeInfo(), - scripts.attrs, - parserOptions, - { slots: ctx.slots }, - ) + scripts.getCurrentVirtualCodeInfo(), + scripts.attrs, + parserOptions, + { slots: ctx.slots }, + ) : parseScript( - scripts.getCurrentVirtualCode(), - scripts.attrs, - parserOptions, - ); + scripts.getCurrentVirtualCode(), + scripts.attrs, + parserOptions, + ); ctx.scriptLet.restore(resultScript); ctx.tokens.push(...resultScript.ast.tokens); ctx.comments.push(...resultScript.ast.comments); diff --git a/src/parser/typescript/analyze/index.ts b/src/parser/typescript/analyze/index.ts index 0d93b169..7d65aa5c 100644 --- a/src/parser/typescript/analyze/index.ts +++ b/src/parser/typescript/analyze/index.ts @@ -16,7 +16,7 @@ import { VirtualTypeScriptContext } from "../context"; import type { TSESParseForESLintResult } from "../types"; import type ESTree from "estree"; import type { SvelteAttribute, SvelteHTMLElement } from "../../../ast"; -import { globalsForSvelte5, globals } from '../../../parser/globals'; +import { globalsForSvelte5, globals } from "../../../parser/globals"; export type AnalyzeTypeScriptContext = { slots: Set; @@ -209,7 +209,8 @@ function analyzeDollarDollarVariables( appendDeclareVirtualScript( "$$slots", - `Record<${nameTypes.size > 0 ? [...nameTypes].join(" | ") : "any" + `Record<${ + nameTypes.size > 0 ? [...nameTypes].join(" | ") : "any" }, boolean>`, ); } @@ -222,8 +223,16 @@ function analyzeDollarDollarVariables( (reference) => reference.identifier.name === svelte5Global, ) ) { - appendDeclareVirtualScript(svelte5Global, '(initial: T): T', "function"); - appendDeclareVirtualScript(svelte5Global, '(): T | undefined', "function"); + appendDeclareVirtualScript( + svelte5Global, + "(initial: T): T", + "function", + ); + appendDeclareVirtualScript( + svelte5Global, + "(): T | undefined", + "function", + ); } break; } @@ -233,7 +242,11 @@ function analyzeDollarDollarVariables( (reference) => reference.identifier.name === svelte5Global, ) ) { - appendDeclareVirtualScript(svelte5Global, '(expression: T): T', "function"); + appendDeclareVirtualScript( + svelte5Global, + "(expression: T): T", + "function", + ); } break; } @@ -244,7 +257,11 @@ function analyzeDollarDollarVariables( (reference) => reference.identifier.name === svelte5Global, ) ) { - appendDeclareVirtualScript(svelte5Global, '(fn: () => void | (() => void)): void', "function"); + appendDeclareVirtualScript( + svelte5Global, + "(fn: () => void | (() => void)): void", + "function", + ); } break; } @@ -254,20 +271,24 @@ function analyzeDollarDollarVariables( (reference) => reference.identifier.name === svelte5Global, ) ) { - appendDeclareVirtualScript(svelte5Global, '(): T', "function"); + appendDeclareVirtualScript(svelte5Global, "(): T", "function"); } break; } default: { const _: never = svelte5Global; - throw Error(`Unknown global: ${_}`) + throw Error(`Unknown global: ${_}`); } } } /** Append declare virtual script */ - function appendDeclareVirtualScript(name: string, type: string, letOrFunction: 'let' | 'function' = "let") { - if (letOrFunction === 'let') { + function appendDeclareVirtualScript( + name: string, + type: string, + letOrFunction: "let" | "function" = "let", + ) { + if (letOrFunction === "let") { ctx.appendVirtualScript(`declare let ${name}: ${type};`); } else { ctx.appendVirtualScript(`declare function ${name}${type};`); diff --git a/tests/src/parser/parser.ts b/tests/src/parser/parser.ts index 747ff048..5459cbf2 100644 --- a/tests/src/parser/parser.ts +++ b/tests/src/parser/parser.ts @@ -158,50 +158,63 @@ function checkLoc(ast: SvelteProgram, fileName: string, code: string) { ); assert.ok( node.range![0] < node.range![1], - `No range on "${node.type} line:${node.loc!.start.line} col:${node.loc!.start.column + `No range on "${node.type} line:${node.loc!.start.line} col:${ + node.loc!.start.column }" in ${fileName}`, ); if (parent) { assert.ok( parent.range![0] <= node.range![0], - `overlap range[0] on "${parent.type} line:${parent.loc!.start.line - } col:${parent.loc!.start.column}" > "${node.type} line:${node.loc!.start.line + `overlap range[0] on "${parent.type} line:${ + parent.loc!.start.line + } col:${parent.loc!.start.column}" > "${node.type} line:${ + node.loc!.start.line } col:${node.loc!.start.column}" in ${fileName}`, ); assert.ok( node.range![1] <= parent.range![1], - `overlap range[1] on "${parent.type} line:${parent.loc!.end.line - } col:${parent.loc!.end.column}" > "${node.type} line:${node.loc!.end.line + `overlap range[1] on "${parent.type} line:${ + parent.loc!.end.line + } col:${parent.loc!.end.column}" > "${node.type} line:${ + node.loc!.end.line } col:${node.loc!.end.column}" in ${fileName}`, ); assert.ok( parent.loc!.start.line <= node.loc!.start.line, - `overlap loc.start.line on "${parent.type} line:${parent.loc!.start.line - } col:${parent.loc!.start.column}" > "${node.type} line:${node.loc!.start.line + `overlap loc.start.line on "${parent.type} line:${ + parent.loc!.start.line + } col:${parent.loc!.start.column}" > "${node.type} line:${ + node.loc!.start.line } col:${node.loc!.start.column}" in ${fileName}`, ); if (parent.loc!.start.line === node.loc!.start.line) { assert.ok( parent.loc!.start.column <= node.loc!.start.column, - `overlap loc.start.column on "${parent.type} line:${parent.loc!.start.line - } col:${parent.loc!.start.column}" > "${node.type} line:${node.loc!.start.line + `overlap loc.start.column on "${parent.type} line:${ + parent.loc!.start.line + } col:${parent.loc!.start.column}" > "${node.type} line:${ + node.loc!.start.line } col:${node.loc!.start.column}" in ${fileName}`, ); } assert.ok( node.loc!.end.line <= parent.loc!.end.line, - `overlap loc.end.line on "${parent.type} line:${parent.loc!.end.line - } col:${parent.loc!.end.column}" > "${node.type} line:${node.loc!.end.line + `overlap loc.end.line on "${parent.type} line:${ + parent.loc!.end.line + } col:${parent.loc!.end.column}" > "${node.type} line:${ + node.loc!.end.line } col:${node.loc!.end.column}" in ${fileName}`, ); if (parent.loc!.end.line === node.loc!.end.line) { assert.ok( node.loc!.end.column <= parent.loc!.end.column, - `overlap loc.end.column on "${parent.type} line:${parent.loc!.end.line - } col:${parent.loc!.end.column}" > "${node.type} line:${node.loc!.end.line + `overlap loc.end.column on "${parent.type} line:${ + parent.loc!.end.line + } col:${parent.loc!.end.column}" > "${node.type} line:${ + node.loc!.end.line } col:${node.loc!.end.column}" in ${fileName}`, ); } diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 9b0cbd27..36b97c96 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -67,13 +67,8 @@ function* listupFixturesImpl(dir: string): Iterable<{ "output.json", ); const scopeFileName = SVELTE_VERSION.startsWith("5") - ? inputFileName.replace( - /input\.svelte$/u, - "scope-output-svelte5.json", - ) : inputFileName.replace( - /input\.svelte$/u, - "scope-output.json", - ); + ? inputFileName.replace(/input\.svelte$/u, "scope-output-svelte5.json") + : inputFileName.replace(/input\.svelte$/u, "scope-output.json"); const typeFileName = inputFileName.replace( /input\.svelte$/u, "type-output.svelte", @@ -417,8 +412,8 @@ function nodeReplacer( type SvelteKeysType = { [key in SvelteNode["type"]]: T extends { type: key } - ? KeyofObject[] - : never; + ? KeyofObject[] + : never; }; type KeyofObject = { [key in keyof T]: key }[keyof T]; const nodeToKeys: SvelteKeysType = { From fd8ffa72c4ca39c672331283c5d4a7b97be461c2 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 00:11:14 +0900 Subject: [PATCH 07/27] update fixture --- .../ast/await04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../05-ts-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/i18n-test-scope-output-svelte5.json | 30 +++++++++++++++++++ ...nt-plugin-svelte-scope-output-svelte5.json | 30 +++++++++++++++++++ ...nt-plugin-svelte-scope-output-svelte5.json | 30 +++++++++++++++++++ .../let-directive04-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ve-with-var04-ts-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-$$props01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-$$slots01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...$slots02-no-slot-scope-output-svelte5.json | 30 +++++++++++++++++++ ...-$$slots03-named-scope-output-svelte5.json | 30 +++++++++++++++++++ ...-$$slots04-named-scope-output-svelte5.json | 30 +++++++++++++++++++ ...it-non-promise01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-each01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-event01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-event02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-event03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-event04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-event05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-event06-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-issue226-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-let/ts-let01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-newline-scope-output-svelte5.json | 30 +++++++++++++++++++ ...s-not-reactive01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-promise01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-promise02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-reactive01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-reactive02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-reactive03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-reactive04-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-reactive05-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ts-reactive06-scope-output-svelte5.json | 30 +++++++++++++++++++ ...ts-scope-issue01-scope-output-svelte5.json | 30 +++++++++++++++++++ ...shorthand-attr01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-store01-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-store02-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-store03-scope-output-svelte5.json | 30 +++++++++++++++++++ .../ast/ts-use01-scope-output-svelte5.json | 30 +++++++++++++++++++ 38 files changed, 1140 insertions(+) diff --git a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json index e57c558c..06b96b88 100644 --- a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json index 2a6b92ee..e29a560a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json index 084048b0..f05ee87c 100644 --- a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json index 3e9b17eb..7b3b453f 100644 --- a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json index f1b3fe4b..7016569e 100644 --- a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json index c275de6d..f00d5214 100644 --- a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json index e856ab20..79d70897 100644 --- a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json index 88771ee2..0aa036ec 100644 --- a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json @@ -66,6 +66,36 @@ "resolved": null } ] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json index 4b25ba9f..cd38315b 100644 --- a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json index 648672e7..ffdd10d8 100644 --- a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json index 3f372d59..fc8478f2 100644 --- a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json index 6b6626a5..0cf44528 100644 --- a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json index 81e1dedf..656a23db 100644 --- a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json index aeef6d56..19c26dc8 100644 --- a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json index 260ec34f..4e4255e2 100644 --- a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json index 6bf44ff7..466cfcc8 100644 --- a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json index 26998ce8..f686e158 100644 --- a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json index 85cf239b..68db634a 100644 --- a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json index f76efcb8..a09008a9 100644 --- a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json index 133d412f..ca2b2075 100644 --- a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json index 5c2dda73..7ddf379e 100644 --- a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json index 5c38953b..0417e4a8 100644 --- a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json index 6c8b5589..fe02aad0 100644 --- a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json index 2c0d503f..abc349b2 100644 --- a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json index d0233285..9ce5e535 100644 --- a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json index 08efafb6..c72a2998 100644 --- a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json index 5868c3d3..5b089e63 100644 --- a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json index 10e688c5..95fcbb9e 100644 --- a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json index 82916d7b..c3e4d86b 100644 --- a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json index cf076acd..ab4d224b 100644 --- a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json index e3e48d32..56751e55 100644 --- a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json index 59d4ba2a..1bfc506f 100644 --- a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json index db945206..8fd524b0 100644 --- a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json index 91a012c6..5dc49a79 100644 --- a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], From dc6a5f0f1f8dd2ceaaeb0590cfd4e90719099869 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 21:18:54 +0900 Subject: [PATCH 08/27] add rune tests (wip) --- .eslintrc.js | 2 +- benchmark/index.ts | 2 +- src/parser/typescript/analyze/index.ts | 157 +- .../parser/ast/ts-$state01-input.svelte | 8 + .../ts-$state01-no-unused-vars-result.json | 8 + .../parser/ast/ts-$state01-output.json | 1715 +++++++++++++++++ .../ast/ts-$state01-prefer-const-result.json | 8 + .../parser/ast/ts-$state01-requirements.json | 5 + .../ast/ts-$state01-scope-output-svelte5.json | 836 ++++++++ .../parser/ast/ts-$state01-scope-output.json | 176 ++ .../parser/ast/ts-$state01-type-output.svelte | 8 + tools/update-fixtures.ts | 3 - 12 files changed, 2854 insertions(+), 74 deletions(-) create mode 100644 tests/fixtures/parser/ast/ts-$state01-input.svelte create mode 100644 tests/fixtures/parser/ast/ts-$state01-no-unused-vars-result.json create mode 100644 tests/fixtures/parser/ast/ts-$state01-output.json create mode 100644 tests/fixtures/parser/ast/ts-$state01-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/ts-$state01-requirements.json create mode 100644 tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/ts-$state01-scope-output.json create mode 100644 tests/fixtures/parser/ast/ts-$state01-type-output.svelte diff --git a/.eslintrc.js b/.eslintrc.js index 15f31316..3b244e33 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -20,7 +20,7 @@ module.exports = { "no-lonely-if": "off", "no-shadow": "off", "no-warning-comments": "warn", - "require-jsdoc": "error", + "require-jsdoc": "off", "prettier/prettier": [ "error", {}, diff --git a/benchmark/index.ts b/benchmark/index.ts index 31225ff3..e74b296c 100644 --- a/benchmark/index.ts +++ b/benchmark/index.ts @@ -1,5 +1,5 @@ // eslint-disable-next-line eslint-comments/disable-enable-pair -- ignore -/* eslint-disable require-jsdoc, no-console -- ignore */ +/* eslint-disable no-console -- ignore */ import * as Benchmark from "benchmark"; import fs from "fs"; import { parseForESLint } from "../src/index"; diff --git a/src/parser/typescript/analyze/index.ts b/src/parser/typescript/analyze/index.ts index 7d65aa5c..d6660547 100644 --- a/src/parser/typescript/analyze/index.ts +++ b/src/parser/typescript/analyze/index.ts @@ -215,84 +215,76 @@ function analyzeDollarDollarVariables( ); } - for (const svelte5Global of globalsForSvelte5) { - switch (svelte5Global) { - case "$state": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareVirtualScript( - svelte5Global, - "(initial: T): T", - "function", - ); - appendDeclareVirtualScript( - svelte5Global, - "(): T | undefined", - "function", - ); + addSvelte5Globals(); + + function addSvelte5Globals() { + for (const svelte5Global of globalsForSvelte5) { + switch (svelte5Global) { + case "$state": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareFunctionVirtualScript( + svelte5Global, + "(initial: T): T", + ); + appendDeclareFunctionVirtualScript( + svelte5Global, + "(): T | undefined", + ); + } + break; } - break; - } - case "$derived": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareVirtualScript( - svelte5Global, - "(expression: T): T", - "function", - ); + case "$derived": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareFunctionVirtualScript( + svelte5Global, + "(expression: T): T", + ); + } + break; } - break; - } - case "$effect": - case "$effect.pre": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareVirtualScript( - svelte5Global, - "(fn: () => void | (() => void)): void", - "function", - ); + case "$effect": + case "$effect.pre": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareFunctionVirtualScript( + svelte5Global, + "(fn: () => void | (() => void)): void", + ); + } + break; } - break; - } - case "$props": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareVirtualScript(svelte5Global, "(): T", "function"); + case "$props": { + if ( + scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + appendDeclareFunctionVirtualScript(svelte5Global, "(): T"); + } + break; + } + default: { + const _: never = svelte5Global; + throw Error(`Unknown global: ${_}`); } - break; - } - default: { - const _: never = svelte5Global; - throw Error(`Unknown global: ${_}`); } } } /** Append declare virtual script */ - function appendDeclareVirtualScript( - name: string, - type: string, - letOrFunction: "let" | "function" = "let", - ) { - if (letOrFunction === "let") { - ctx.appendVirtualScript(`declare let ${name}: ${type};`); - } else { - ctx.appendVirtualScript(`declare function ${name}${type};`); - } + function appendDeclareVirtualScript(name: string, type: string) { + ctx.appendVirtualScript(`declare let ${name}: ${type};`); ctx.restoreContext.addRestoreStatementProcess((node, result) => { if ( node.type !== "VariableDeclaration" || @@ -317,6 +309,33 @@ function analyzeDollarDollarVariables( return true; }); } + + /** Append declare virtual script */ + function appendDeclareFunctionVirtualScript(name: string, type: string) { + ctx.appendVirtualScript(`declare function ${name}${type};`); + ctx.restoreContext.addRestoreStatementProcess((node, result) => { + if ( + node.type !== "TSDeclareFunction" || + !node.declare || + node.id?.type !== "Identifier" || + node.id.name !== name + ) { + return false; + } + const program = result.ast; + program.body.splice(program.body.indexOf(node), 1); + + const scopeManager = result.scopeManager as ScopeManager; + + // Remove `declare` variable + removeAllScopeAndVariableAndReference(node, { + visitorKeys: result.visitorKeys, + scopeManager, + }); + + return true; + }); + } } /** diff --git a/tests/fixtures/parser/ast/ts-$state01-input.svelte b/tests/fixtures/parser/ast/ts-$state01-input.svelte new file mode 100644 index 00000000..64b6881d --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-input.svelte @@ -0,0 +1,8 @@ + + + diff --git a/tests/fixtures/parser/ast/ts-$state01-no-unused-vars-result.json b/tests/fixtures/parser/ast/ts-$state01-no-unused-vars-result.json new file mode 100644 index 00000000..6fcf6809 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-no-unused-vars-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "no-unused-vars", + "code": "name", + "line": 3, + "column": 7 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$state01-output.json b/tests/fixtures/parser/ast/ts-$state01-output.json new file mode 100644 index 00000000..82240390 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-output.json @@ -0,0 +1,1715 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 21, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 50, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "range": [ + 46, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 67, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "range": [ + 0, + 76 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 79, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 86, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 86, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 78, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n clicks: ", + "range": [ + 113, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 125, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "range": [ + 124, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 8, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 132, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 78, + 141 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 69, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 76, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 79, + 85 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 86, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 89, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 100, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "o", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "u", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "n", + "range": [ + 106, + 107 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "t", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 34 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "\n ", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "clicks:", + "range": [ + 116, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 125, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 17 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 7, + "column": 17 + }, + "end": { + "line": 8, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "range": [ + 0, + 142 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$state01-prefer-const-result.json b/tests/fixtures/parser/ast/ts-$state01-prefer-const-result.json new file mode 100644 index 00000000..1dd47a63 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "name", + "line": 3, + "column": 7 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$state01-requirements.json b/tests/fixtures/parser/ast/ts-$state01-requirements.json new file mode 100644 index 00000000..b0d8202a --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-requirements.json @@ -0,0 +1,5 @@ +{ + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json new file mode 100644 index 00000000..ad84f430 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json @@ -0,0 +1,836 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 125, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "name", + "identifiers": [ + { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + "range": [ + 50, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "name", + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 125, + 130 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$state01-scope-output.json b/tests/fixtures/parser/ast/ts-$state01-scope-output.json new file mode 100644 index 00000000..88771ee2 --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-scope-output.json @@ -0,0 +1,176 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 35, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 35, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$$props", + "range": [ + 23, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$$restProps", + "range": [ + 35, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-$state01-type-output.svelte b/tests/fixtures/parser/ast/ts-$state01-type-output.svelte new file mode 100644 index 00000000..b5c1737c --- /dev/null +++ b/tests/fixtures/parser/ast/ts-$state01-type-output.svelte @@ -0,0 +1,8 @@ + + + diff --git a/tools/update-fixtures.ts b/tools/update-fixtures.ts index 81c8e2ed..53bdc6b4 100644 --- a/tools/update-fixtures.ts +++ b/tools/update-fixtures.ts @@ -185,7 +185,6 @@ for (const { input, inputFileName, outputFileName, config } of listupFixtures( ); } -// eslint-disable-next-line require-jsdoc -- X function createLinter() { const linter = new Linter(); @@ -194,7 +193,6 @@ function createLinter() { return linter; } -// eslint-disable-next-line require-jsdoc -- X function buildTypes( input: string, result: { @@ -235,7 +233,6 @@ function buildTypes( const lines = input.split(/\r?\n/); const types: string[][] = []; - // eslint-disable-next-line require-jsdoc -- X function addType(node: ESTree.Expression) { const tsNode = tsNodeMap.get(node); if (!tsNode) { From fc5ccaa8c7e5bf691e852fdeebb3c71b990c0e96 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:03:47 +0900 Subject: [PATCH 09/27] reduce duplicated expected files --- .../ast/$$slots-scope-output-svelte5.json | 72 +- .../parser/ast/$var-scope-output-svelte5.json | 239 +- ...within-component-scope-output-svelte5.json | 792 +- .../ast/attr01-scope-output-svelte5.json | 804 +- .../ast/await01-scope-output-svelte5.json | 864 +- .../ast/await02-scope-output-svelte5.json | 924 +- .../ast/await03-scope-output-svelte5.json | 576 +- .../ast/await04-scope-output-svelte5.json | 523 +- ...rite-less-code01-scope-output-svelte5.json | 862 +- ...lass-directive01-scope-output-svelte5.json | 542 +- .../ast/comments01-scope-output-svelte5.json | 16 +- .../components01-scope-output-svelte5.json | 181 +- .../components02-scope-output-svelte5.json | 181 +- .../components03-scope-output-svelte5.json | 250 +- .../components04-scope-output-svelte5.json | 181 +- ...n-with-expr-like-scope-output-svelte5.json | 583 +- ...ve-use-with-expr-scope-output-svelte5.json | 795 +- .../01-scope-output-svelte5.json | 16 +- .../02-scope-output-svelte5.json | 291 +- .../03-scope-output-svelte5.json | 530 +- .../04-scope-output-svelte5.json | 1564 +- .../05-scope-output-svelte5.json | 222 +- .../06-scope-output-svelte5.json | 222 +- .../01-scope-output-svelte5.json | 670 +- .../01-scope-output-svelte5.json | 605 +- .../02-scope-output-svelte5.json | 1669 +- .../03-scope-output-svelte5.json | 817 +- .../01-scope-output-svelte5.json | 1146 +- .../01-scope-output-svelte5.json | 836 +- .../03-style/01-scope-output-svelte5.json | 16 +- .../03-style/02-scope-output-svelte5.json | 16 +- .../03-style/03-scope-output-svelte5.json | 16 +- .../03-style/04-scope-output-svelte5.json | 16 +- .../01-tags/01-scope-output-svelte5.json | 181 +- .../01-scope-output-svelte5.json | 16 +- .../02-scope-output-svelte5.json | 16 +- .../03-scope-output-svelte5.json | 155 +- .../04-scope-output-svelte5.json | 86 +- .../05-scope-output-svelte5.json | 16 +- .../06-scope-output-svelte5.json | 86 +- .../07-scope-output-svelte5.json | 155 +- .../08-scope-output-svelte5.json | 155 +- .../09-scope-output-svelte5.json | 155 +- .../10-scope-output-svelte5.json | 132 +- .../11-scope-output-svelte5.json | 64 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 362 +- .../04-comments/01-scope-output-svelte5.json | 16 +- .../04-comments/02-scope-output-svelte5.json | 86 +- .../05-hash-if/01-scope-output-svelte5.json | 329 +- .../05-hash-if/02-scope-output-svelte5.json | 94 +- .../05-hash-if/03-scope-output-svelte5.json | 177 +- .../06-hash-each/01-scope-output-svelte5.json | 1615 +- .../06-hash-each/02-scope-output-svelte5.json | 600 +- .../06-hash-each/03-scope-output-svelte5.json | 1240 +- .../06-hash-each/04-scope-output-svelte5.json | 2144 +- .../06-hash-each/05-scope-output-svelte5.json | 5250 +--- .../06-hash-each/06-scope-output-svelte5.json | 547 +- .../01-scope-output-svelte5.json | 863 +- .../02-scope-output-svelte5.json | 881 +- .../03-scope-output-svelte5.json | 469 +- .../04-scope-output-svelte5.json | 426 +- .../05-scope-output-svelte5.json | 426 +- .../08-hash-key/01-scope-output-svelte5.json | 94 +- .../08-hash-key/02-scope-output-svelte5.json | 280 +- .../08-hash-key/03-scope-output-svelte5.json | 188 +- .../09-at-html/01-scope-output-svelte5.json | 86 +- .../09-at-html/02-scope-output-svelte5.json | 155 +- .../10-at-debug/01-scope-output-svelte5.json | 293 +- .../10-at-debug/02-scope-output-svelte5.json | 476 +- .../10-at-debug/03-scope-output-svelte5.json | 293 +- .../01-scope-output-svelte5.json | 268 +- .../02-scope-output-svelte5.json | 1445 +- .../01-scope-output-svelte5.json | 155 +- .../02-scope-output-svelte5.json | 890 +- .../03-scope-output-svelte5.json | 188 +- .../04-scope-output-svelte5.json | 86 +- .../05-scope-output-svelte5.json | 16 +- .../06-scope-output-svelte5.json | 1415 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 224 +- .../03-scope-output-svelte5.json | 155 +- .../04-scope-output-svelte5.json | 155 +- .../05-scope-output-svelte5.json | 86 +- .../06-scope-output-svelte5.json | 293 +- .../07-scope-output-svelte5.json | 86 +- .../08-scope-output-svelte5.json | 86 +- .../09-scope-output-svelte5.json | 86 +- .../10-scope-output-svelte5.json | 983 +- .../11-scope-output-svelte5.json | 362 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 941 +- .../04-bind-this/01-scope-output-svelte5.json | 86 +- .../04-bind-this/02-scope-output-svelte5.json | 923 +- .../01-scope-output-svelte5.json | 155 +- .../02-scope-output-svelte5.json | 431 +- .../01-scope-output-svelte5.json | 155 +- .../02-scope-output-svelte5.json | 293 +- .../02.1-scope-output-svelte5.json | 16 +- .../03-scope-output-svelte5.json | 16 +- .../01-scope-output-svelte5.json | 1400 +- .../02-scope-output-svelte5.json | 607 +- .../03-scope-output-svelte5.json | 1518 +- .../01-scope-output-svelte5.json | 2906 +-- .../02-scope-output-svelte5.json | 188 +- .../03-scope-output-svelte5.json | 188 +- .../04-scope-output-svelte5.json | 5127 +--- .../05-scope-output-svelte5.json | 8781 +------ .../05-ts-scope-output-svelte5.json | 10542 +------- .../06-scope-output-svelte5.json | 685 +- .../07-scope-output-svelte5.json | 428 +- .../01-scope-output-svelte5.json | 845 +- .../02-scope-output-svelte5.json | 280 +- .../01-scope-output-svelte5.json | 4510 +--- .../02-scope-output-svelte5.json | 960 +- .../03-scope-output-svelte5.json | 1112 +- .../04-scope-output-svelte5.json | 12263 +-------- .../05-scope-output-svelte5.json | 12280 +-------- .../01-scope-output-svelte5.json | 155 +- .../02-scope-output-svelte5.json | 155 +- .../03-scope-output-svelte5.json | 86 +- .../01-scope-output-svelte5.json | 155 +- .../02-scope-output-svelte5.json | 155 +- .../03-scope-output-svelte5.json | 86 +- .../01-scope-output-svelte5.json | 155 +- .../02-scope-output-svelte5.json | 155 +- .../04-bind-this/01-scope-output-svelte5.json | 155 +- .../04-bind-this/02-scope-output-svelte5.json | 257 +- .../13-slot/00/01-scope-output-svelte5.json | 86 +- .../13-slot/00/02-scope-output-svelte5.json | 155 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 155 +- .../02-$$slots/01-scope-output-svelte5.json | 140 +- .../01-scope-output-svelte5.json | 1279 +- .../02-scope-output-svelte5.json | 1183 +- .../01-scope-output-svelte5.json | 479 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 155 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 484 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 86 +- .../03-scope-output-svelte5.json | 887 +- .../04-scope-output-svelte5.json | 86 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 155 +- .../01-scope-output-svelte5.json | 86 +- .../02-scope-output-svelte5.json | 155 +- .../01-scope-output-svelte5.json | 16 +- .../02-scope-output-svelte5.json | 16 +- .../01-scope-output-svelte5.json | 86 +- .../02-old-scope-output-svelte5.json | 16 +- .../02-scope-output-svelte5.json | 16 +- .../01-scope-output-svelte5.json | 86 +- ...ach-with-comment-scope-output-svelte5.json | 616 +- ...empty-elements01-scope-output-svelte5.json | 16 +- .../hello-world01-scope-output-svelte5.json | 280 +- .../hello-world02-scope-output-svelte5.json | 181 +- .../hello-world03-scope-output-svelte5.json | 16 +- .../hello-world04-scope-output-svelte5.json | 755 +- .../hello-world05-scope-output-svelte5.json | 3246 +-- .../html-comments01-scope-output-svelte5.json | 280 +- .../ast/i18n-test-scope-output-svelte5.json | 200 +- .../ast/if-block01-scope-output-svelte5.json | 177 +- .../dot-in-bind01-scope-output-svelte5.json | 280 +- ....41-empty-bind01-scope-output-svelte5.json | 280 +- ...nt-plugin-svelte-scope-output-svelte5.json | 3156 +-- ...nt-plugin-svelte-scope-output-svelte5.json | 474 +- ...nt-plugin-svelte-scope-output-svelte5.json | 1833 +- .../kit-demo-home-scope-output-svelte5.json | 363 +- .../ast/label01-scope-output-svelte5.json | 1472 +- .../let-directive01-scope-output-svelte5.json | 2828 +- .../let-directive02-scope-output-svelte5.json | 691 +- .../let-directive03-scope-output-svelte5.json | 2307 +- .../let-directive04-scope-output-svelte5.json | 797 +- ...che-with-comment-scope-output-svelte5.json | 86 +- ...ing-script-tag01-scope-output-svelte5.json | 16 +- .../ast/props01-scope-output-svelte5.json | 240 +- .../ast/props02-scope-output-svelte5.json | 141 +- .../ast/props03-scope-output-svelte5.json | 222 +- .../ast/props04-scope-output-svelte5.json | 222 +- .../pug/each/each01-scope-output-svelte5.json | 470 +- ...closing-template-scope-output-svelte5.json | 86 +- ...th-destructure01-scope-output-svelte5.json | 618 +- ...th-destructure02-scope-output-svelte5.json | 734 +- ...th-destructure03-scope-output-svelte5.json | 656 +- ...th-destructure04-scope-output-svelte5.json | 557 +- ...th-destructure05-scope-output-svelte5.json | 593 +- ...ive-with-store01-scope-output-svelte5.json | 1059 +- ...ive-with-store02-scope-output-svelte5.json | 943 +- ...ctive-with-var01-scope-output-svelte5.json | 2352 +- ...ctive-with-var02-scope-output-svelte5.json | 1458 +- ...ctive-with-var03-scope-output-svelte5.json | 312 +- ...ve-with-var04-ts-scope-output-svelte5.json | 584 +- .../parser/ast/sass-scope-output-svelte5.json | 16 +- .../script-in-style-scope-output-svelte5.json | 16 +- .../ast/script-tag-scope-output-svelte5.json | 16 +- ...-closing-style01-scope-output-svelte5.json | 16 +- .../store-bindings-scope-output-svelte5.json | 550 +- ...tyle-directive01-scope-output-svelte5.json | 16 +- ...tyle-directive02-scope-output-svelte5.json | 293 +- ...tyle-directive03-scope-output-svelte5.json | 280 +- .../style-global01-scope-output-svelte5.json | 16 +- .../style-global02-scope-output-svelte5.json | 16 +- .../style-in-script-scope-output-svelte5.json | 526 +- .../ast/style01-scope-output-svelte5.json | 16 +- .../ast/style02-scope-output-svelte5.json | 16 +- ...t-with-bind-this-scope-output-svelte5.json | 593 +- .../{ => svelte5}/ts-$state01-input.svelte | 0 .../ts-$state01-no-unused-vars-result.json | 0 .../ast/{ => svelte5}/ts-$state01-output.json | 0 .../ts-$state01-prefer-const-result.json | 0 .../ts-$state01-requirements.json | 0 .../ts-$state01-scope-output.json} | 219 +- .../ts-$state01-type-output.svelte | 0 ...rly-spacing-test-scope-output-svelte5.json | 279 +- .../ast/this-attr01-scope-output-svelte5.json | 1126 +- .../ast/this-attr02-scope-output-svelte5.json | 1126 +- .../ast/this-attr03-scope-output-svelte5.json | 1126 +- .../ast/this-attr04-scope-output-svelte5.json | 16 +- .../ast/this-attr05-scope-output-svelte5.json | 16 +- ...ailing-comment01-scope-output-svelte5.json | 466 +- .../ts-$$props01-scope-output-svelte5.json | 110 +- .../ts-$$slots01-scope-output-svelte5.json | 64 +- ...$slots02-no-slot-scope-output-svelte5.json | 64 +- ...-$$slots03-named-scope-output-svelte5.json | 64 +- ...-$$slots04-named-scope-output-svelte5.json | 64 +- .../parser/ast/ts-$state01-scope-output.json | 176 - ...it-non-promise01-scope-output-svelte5.json | 1477 +- .../ast/ts-each01-scope-output-svelte5.json | 3789 +-- .../ast/ts-event01-scope-output-svelte5.json | 410 +- .../ast/ts-event02-scope-output-svelte5.json | 410 +- .../ast/ts-event03-scope-output-svelte5.json | 1197 +- .../ast/ts-event04-scope-output-svelte5.json | 286 +- .../ast/ts-event05-scope-output-svelte5.json | 451 +- .../ast/ts-event06-scope-output-svelte5.json | 451 +- .../ast/ts-issue226-scope-output-svelte5.json | 4927 +--- .../ts-let/ts-let01-scope-output-svelte5.json | 3421 +-- .../ast/ts-newline-scope-output-svelte5.json | 1133 +- ...s-not-reactive01-scope-output-svelte5.json | 1798 +- .../ts-promise01-scope-output-svelte5.json | 3101 +-- .../ts-promise02-scope-output-svelte5.json | 6684 +---- .../ts-reactive01-scope-output-svelte5.json | 1318 +- .../ts-reactive02-scope-output-svelte5.json | 2340 +- .../ts-reactive03-scope-output-svelte5.json | 1110 +- .../ts-reactive04-scope-output-svelte5.json | 1064 +- .../ts-reactive05-scope-output-svelte5.json | 1724 +- .../ts-reactive06-scope-output-svelte5.json | 4900 +--- ...ts-scope-issue01-scope-output-svelte5.json | 1342 +- ...shorthand-attr01-scope-output-svelte5.json | 360 +- .../ast/ts-store01-scope-output-svelte5.json | 2324 +- .../ast/ts-store02-scope-output-svelte5.json | 1388 +- .../ast/ts-store03-scope-output-svelte5.json | 5162 +--- .../ast/ts-use01-scope-output-svelte5.json | 3892 +-- .../actions-scope-output-svelte5.json | 5904 +---- .../adding-data-scope-output-svelte5.json | 280 +- ...eters-to-actions-scope-output-svelte5.json | 1271 +- ...s-to-transitions-scope-output-svelte5.json | 591 +- .../animate-scope-output-svelte5.json | 21425 +--------------- ...-subscriptions01-scope-output-svelte5.json | 1872 +- .../await-blocks-scope-output-svelte5.json | 5197 +--- .../tutorial/basics-scope-output-svelte5.json | 16 +- .../bind-this-scope-output-svelte5.json | 14651 +---------- .../checkbox-inputs-scope-output-svelte5.json | 455 +- .../class-shorthand-scope-output-svelte5.json | 440 +- .../classes-scope-output-svelte5.json | 828 +- ...onent-bindings01-scope-output-svelte5.json | 1513 +- ...onent-bindings02-scope-output-svelte5.json | 3226 +-- ...mponent-events01-scope-output-svelte5.json | 994 +- ...mponent-events02-scope-output-svelte5.json | 873 +- .../congratulations-scope-output-svelte5.json | 8829 +------ ...ditable-bindings-scope-output-svelte5.json | 360 +- .../context-api01-scope-output-svelte5.json | 744 +- .../context-api02-scope-output-svelte5.json | 3649 +-- .../context-api03-scope-output-svelte5.json | 2857 +-- ...ss-transitions01-scope-output-svelte5.json | 6677 +---- ...ss-transitions02-scope-output-svelte5.json | 6570 +---- ...m-js-transitions-scope-output-svelte5.json | 8602 +------ .../custom-stores-scope-output-svelte5.json | 439 +- .../debug01-scope-output-svelte5.json | 636 +- .../debug02-scope-output-svelte5.json | 705 +- ...eclaring-props01-scope-output-svelte5.json | 181 +- ...eclaring-props02-scope-output-svelte5.json | 222 +- ...default-values01-scope-output-svelte5.json | 181 +- ...default-values02-scope-output-svelte5.json | 320 +- ...rred-transitions-scope-output-svelte5.json | 20898 +-------------- .../derived-stores-scope-output-svelte5.json | 1156 +- .../dimensions-scope-output-svelte5.json | 1190 +- ...ent-forwarding01-scope-output-svelte5.json | 550 +- ...ent-forwarding02-scope-output-svelte5.json | 16 +- .../dom-events-scope-output-svelte5.json | 1803 +- ...namic-attributes-scope-output-svelte5.json | 440 +- ...h-block-bindings-scope-output-svelte5.json | 4134 +-- .../each-blocks01-scope-output-svelte5.json | 1404 +- .../each-blocks02-scope-output-svelte5.json | 2249 +- .../else-blocks-scope-output-svelte5.json | 1123 +- ...else-if-blocks01-scope-output-svelte5.json | 878 +- ...else-if-blocks02-scope-output-svelte5.json | 748 +- ...ent-forwarding01-scope-output-svelte5.json | 994 +- ...ent-forwarding02-scope-output-svelte5.json | 873 +- ...ent-forwarding03-scope-output-svelte5.json | 1367 +- ...ent-forwarding04-scope-output-svelte5.json | 181 +- .../event-modifiers-scope-output-svelte5.json | 387 +- .../group-inputs-scope-output-svelte5.json | 4438 +--- .../html-tags01-scope-output-svelte5.json | 303 +- .../html-tags02-scope-output-svelte5.json | 303 +- .../if-blocks-scope-output-svelte5.json | 1203 +- .../in-and-out-scope-output-svelte5.json | 812 +- .../inline-handlers-scope-output-svelte5.json | 2344 +- ...eyed-each-blocks-scope-output-svelte5.json | 2247 +- ...ocal-transitions-scope-output-svelte5.json | 2002 +- .../media-elements-scope-output-svelte5.json | 13426 +--------- ...module-exports01-scope-output-svelte5.json | 682 +- ...module-exports02-scope-output-svelte5.json | 4381 +--- ...-select-bindings-scope-output-svelte5.json | 4193 +-- .../named-slots01-scope-output-svelte5.json | 181 +- .../named-slots02-scope-output-svelte5.json | 16 +- ...ted-components01-scope-output-svelte5.json | 181 +- ...ted-components02-scope-output-svelte5.json | 16 +- ...numeric-inputs01-scope-output-svelte5.json | 1022 +- ...numeric-inputs02-scope-output-svelte5.json | 1022 +- .../ondestroy-scope-output-svelte5.json | 1258 +- .../onmount-scope-output-svelte5.json | 2087 +- ...optional-slots01-scope-output-svelte5.json | 493 +- ...optional-slots02-scope-output-svelte5.json | 972 +- ...optional-slots03-scope-output-svelte5.json | 927 +- ...tive-assignments-scope-output-svelte5.json | 755 +- ...ive-declarations-scope-output-svelte5.json | 1174 +- ...ctive-statements-scope-output-svelte5.json | 1638 +- .../readable-stores-scope-output-svelte5.json | 855 +- .../select-bindings-scope-output-svelte5.json | 3029 +-- .../sharing-code01-scope-output-svelte5.json | 501 +- .../sharing-code02-scope-output-svelte5.json | 2617 +- ...slot-fallbacks01-scope-output-svelte5.json | 261 +- ...slot-fallbacks02-scope-output-svelte5.json | 16 +- .../slot-props01-scope-output-svelte5.json | 1023 +- .../slot-props02-scope-output-svelte5.json | 971 +- .../slot-props03-scope-output-svelte5.json | 1023 +- .../slots01-scope-output-svelte5.json | 181 +- .../slots02-scope-output-svelte5.json | 16 +- .../spread-props01-scope-output-svelte5.json | 915 +- .../spread-props02-scope-output-svelte5.json | 914 +- .../spread-props03-scope-output-svelte5.json | 675 +- .../tutorial/spring-scope-output-svelte5.json | 2490 +- .../styling01-scope-output-svelte5.json | 16 +- .../styling02-scope-output-svelte5.json | 16 +- .../svelte-body-scope-output-svelte5.json | 1179 +- ...svelte-component-scope-output-svelte5.json | 2128 +- .../svelte-document-scope-output-svelte5.json | 1095 +- .../svelte-element-scope-output-svelte5.json | 1337 +- .../svelte-fragment-scope-output-svelte5.json | 181 +- .../svelte-head-scope-output-svelte5.json | 16 +- ...svelte-options01-scope-output-svelte5.json | 4832 +--- ...svelte-options02-scope-output-svelte5.json | 980 +- ...svelte-options03-scope-output-svelte5.json | 980 +- .../svelte-self01-scope-output-svelte5.json | 2430 +- .../svelte-self02-scope-output-svelte5.json | 792 +- .../svelte-self03-scope-output-svelte5.json | 2557 +- ...-window-bindings-scope-output-svelte5.json | 1976 +- .../svelte-window-scope-output-svelte5.json | 1821 +- .../text-inputs01-scope-output-svelte5.json | 360 +- .../text-inputs02-scope-output-svelte5.json | 360 +- .../textarea-inputs-scope-output-svelte5.json | 546 +- .../tutorial/tick-scope-output-svelte5.json | 7035 +---- ...ransition-events-scope-output-svelte5.json | 1530 +- .../transition-scope-output-svelte5.json | 591 +- .../tweened-scope-output-svelte5.json | 1460 +- .../tutorial/update-scope-output-svelte5.json | 11168 +------- ...rays-and-objects-scope-output-svelte5.json | 2276 +- ...ritable-stores01-scope-output-svelte5.json | 1611 +- ...ritable-stores02-scope-output-svelte5.json | 864 +- ...ritable-stores03-scope-output-svelte5.json | 864 +- ...ritable-stores04-scope-output-svelte5.json | 553 +- ...nown-directive01-scope-output-svelte5.json | 462 +- ...write-only-store-scope-output-svelte5.json | 1270 +- tests/src/parser/parser.ts | 10 +- tests/src/parser/test-utils.ts | 44 +- 377 files changed, 669 insertions(+), 470759 deletions(-) rename tests/fixtures/parser/ast/{ => svelte5}/ts-$state01-input.svelte (100%) rename tests/fixtures/parser/ast/{ => svelte5}/ts-$state01-no-unused-vars-result.json (100%) rename tests/fixtures/parser/ast/{ => svelte5}/ts-$state01-output.json (100%) rename tests/fixtures/parser/ast/{ => svelte5}/ts-$state01-prefer-const-result.json (100%) rename tests/fixtures/parser/ast/{ => svelte5}/ts-$state01-requirements.json (100%) rename tests/fixtures/parser/ast/{ts-$state01-scope-output-svelte5.json => svelte5/ts-$state01-scope-output.json} (81%) rename tests/fixtures/parser/ast/{ => svelte5}/ts-$state01-type-output.svelte (100%) delete mode 100644 tests/fixtures/parser/ast/ts-$state01-scope-output.json diff --git a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json index 673549f1..2bc42d76 100644 --- a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,72 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json index 52f7b07a..521634fa 100644 --- a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,239 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "local": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 42, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 4 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 42, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 4 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json index c8ae6c38..521634fa 100644 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,792 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Component", - "identifiers": [ - { - "type": "Identifier", - "name": "Component", - "range": [ - 18, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 18, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Component", - "range": [ - 18, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 18, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 80, - 89 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 18, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 66, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 80, - 89 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 18, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "b", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 109, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "range": [ - 101, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 115, - 116 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 115, - 116 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 101, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json index c3dbd581..521634fa 100644 --- a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,804 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 19, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 15, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 28, - 33 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ] - }, - { - "name": "c", - "identifiers": [ - { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 45, - 46 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "range": [ - 41, - 46 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json index c0f0ebe9..521634fa 100644 --- a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,866 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "expression", - "identifiers": [ - { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 13, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 106, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 144, - 154 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 184, - 194 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 106, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 144, - 154 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 184, - 194 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 28 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 28 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n", - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 15, - "column": 0 - } - } - } - ], - "range": [ - 136, - 166 - ], - "loc": { - "start": { - "line": 14, - "column": 0 - }, - "end": { - "line": 15, - "column": 0 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 201, - 205 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 201, - 205 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": true, - "error": { - "type": "Identifier", - "name": "name", - "range": [ - 201, - 205 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n", - "range": [ - 206, - 207 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 18, - "column": 0 - } - } - } - ], - "range": [ - 176, - 207 - ], - "loc": { - "start": { - "line": 17, - "column": 0 - }, - "end": { - "line": 18, - "column": 0 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json index 0bc4c394..521634fa 100644 --- a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,926 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "expression", - "identifiers": [ - { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 13, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 127, - 137 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 246, - 256 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 127, - 137 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 246, - 256 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "theError", - "identifiers": [ - { - "type": "Identifier", - "name": "theError", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "theError", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "theError", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 193, - 195 - ], - "loc": { - "start": { - "line": 11, - "column": 17 - }, - "end": { - "line": 12, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 196, - 197 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 195, - 198 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "oh no! ", - "range": [ - 198, - 205 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "theError", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 215, - 222 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 28 - } - } - }, - "range": [ - 206, - 222 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 28 - } - } - }, - "range": [ - 205, - 223 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 29 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 223, - 227 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - "range": [ - 195, - 227 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 227, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 33 - }, - "end": { - "line": 13, - "column": 0 - } - } - } - ], - "range": [ - 176, - 228 - ], - "loc": { - "start": { - "line": 11, - "column": 0 - }, - "end": { - "line": 13, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "theError", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "theError", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "theError", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "theError", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/await03-scope-output-svelte5.json b/tests/fixtures/parser/ast/await03-scope-output-svelte5.json index 9f372949..b8e63d13 100644 --- a/tests/fixtures/parser/ast/await03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -19,578 +18,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "expression", - "identifiers": [ - { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 13, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 103, - 113 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 139, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 103, - 113 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 139, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expression", - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json index 06b96b88..521634fa 100644 --- a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,525 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "p", - "identifiers": [ - { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Promise", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "resolve", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "optional": false, - "range": [ - 31, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "range": [ - 27, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "v", - "identifiers": [ - { - "type": "Identifier", - "name": "v", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "v", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "v", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n", - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - ], - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json index ba15bda3..521634fa 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,862 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 18, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 6, - "column": 33 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 9, - "column": 16 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 114, - 115 - ], - "loc": { - "start": { - "line": 7, - "column": 33 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 139, - 140 - ], - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 6, - "column": 33 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 114, - 115 - ], - "loc": { - "start": { - "line": 7, - "column": 33 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 9, - "column": 16 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 139, - 140 - ], - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json index 13050424..521634fa 100644 --- a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,542 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 20, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 14, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 94, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 38, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "range": [ - 32, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 94, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json index 2a0a2128..521634fa 100644 --- a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "MyComponent", - "identifiers": [ - { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 70, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 70, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json index 2a0a2128..521634fa 100644 --- a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "MyComponent", - "identifiers": [ - { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 70, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 70, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json index ab70be02..521634fa 100644 --- a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,252 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "MyComponents", - "identifiers": [ - { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "node": { - "type": "ImportNamespaceSpecifier", - "local": { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "range": [ - 17, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 70, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 70, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyComponents", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "OtherComponents", - "range": [ - 146, - 161 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "OtherComponents", - "range": [ - 146, - 161 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "OtherComponents", - "range": [ - 146, - 161 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json index 8f4748e9..521634fa 100644 --- a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Nested", - "identifiers": [ - { - "type": "Identifier", - "name": "Nested", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Nested", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportNamespaceSpecifier", - "local": { - "type": "Identifier", - "name": "Nested", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 65, - 71 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 65, - 71 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json index 12225d9c..521634fa 100644 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,585 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Inner", - "identifiers": [ - { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 102, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'foo.bar'", - "value": "foo.bar", - "range": [ - 77, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 41 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 71, - 87 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 42 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 65, - 87 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 42 - } - } - }, - "range": [ - 60, - 87 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 42 - } - } - } - ], - "range": [ - 58, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 44 - } - } - }, - "range": [ - 52, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 44 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 102, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json index d87484c5..521634fa 100644 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,795 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 27, - 30 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 57, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 52, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "'Success'", - "value": "Success", - "range": [ - 71, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "range": [ - 52, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "range": [ - 52, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 36 - } - } - } - ], - "range": [ - 42, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - ], - "range": [ - 32, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "range": [ - 27, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - } - ], - "range": [ - 21, - 88 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - "range": [ - 15, - 88 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 6, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 57, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 52, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "'Success'", - "value": "Success", - "range": [ - 71, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "range": [ - 52, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "range": [ - 52, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 36 - } - } - } - ], - "range": [ - 42, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - ], - "range": [ - 32, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 5, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json index eff63b2b..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,293 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "init": null, - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 111, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 97, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 111, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 97, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 97, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json index 527cf046..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,532 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "init": { - "type": "Literal", - "raw": "'optional default initial value'", - "value": "optional default initial value", - "range": [ - 27, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 50 - } - } - }, - "range": [ - 21, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "baz", - "identifiers": [ - { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "init": { - "type": "Identifier", - "name": "undefined", - "range": [ - 79, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 73, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 73, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "undefined", - "range": [ - 79, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "undefined", - "range": [ - 79, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "undefined", - "range": [ - 79, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json index 45cb227d..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1566 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "thisIs", - "identifiers": [ - { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "init": { - "type": "Literal", - "raw": "'readonly'", - "value": "readonly", - "range": [ - 55, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "range": [ - 46, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ] - }, - { - "name": "greet", - "identifiers": [ - { - "type": "Identifier", - "name": "greet", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "greet", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 116, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "hello ", - "raw": "hello " - }, - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "!", - "raw": "!" - }, - "range": [ - 120, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 24 - } - } - } - ], - "range": [ - 107, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 24 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 101, - 124 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 101, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - ], - "range": [ - 97, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "greet", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 76, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "format", - "identifiers": [ - { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 10, - "column": 36 - }, - "end": { - "line": 10, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "n", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toFixed", - "range": [ - 177, - 184 - ], - "loc": { - "start": { - "line": 10, - "column": 28 - }, - "end": { - "line": 10, - "column": 35 - } - } - }, - "range": [ - 175, - 184 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 175, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "range": [ - 170, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "range": [ - 161, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "thisIs", - "range": [ - 46, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 161, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 116, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "hello ", - "raw": "hello " - }, - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "!", - "raw": "!" - }, - "range": [ - 120, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 24 - } - } - } - ], - "range": [ - 107, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 24 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 101, - 124 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 101, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - ], - "range": [ - 97, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "greet", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 76, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 116, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 116, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "n", - "identifiers": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 10, - "column": 36 - }, - "end": { - "line": 10, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "n", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toFixed", - "range": [ - 177, - 184 - ], - "loc": { - "start": { - "line": 10, - "column": 28 - }, - "end": { - "line": 10, - "column": 35 - } - } - }, - "range": [ - 175, - 184 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 175, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "range": [ - 170, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json index c3551a31..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,222 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "className", - "identifiers": [ - { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": null, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "className", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "className", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "className", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json index c3551a31..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,222 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "className", - "identifiers": [ - { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": null, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "className", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "className", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "className", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "className", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json index af23cc7d..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,670 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 143, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 143, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 151, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 143, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 143, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 20 - } - } - } - ], - "range": [ - 51, - 164 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [], - "range": [ - 27, - 164 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 143, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 143, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json index 96844bfb..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,607 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "title", - "identifiers": [ - { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "init": null, - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 126, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 232, - 237 - ], - "loc": { - "start": { - "line": 10, - "column": 38 - }, - "end": { - "line": 10, - "column": 43 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 109, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 126, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 142, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 232, - 237 - ], - "loc": { - "start": { - "line": 10, - "column": 38 - }, - "end": { - "line": 10, - "column": 43 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 142, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 232, - 237 - ], - "loc": { - "start": { - "line": 10, - "column": 38 - }, - "end": { - "line": 10, - "column": 43 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 109, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 142, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 109, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 142, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json index b403e0ef..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1669 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 18, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 113, - 114 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 167, - 168 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "y", - "identifiers": [ - { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 221, - 222 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - }, - { - "name": "yPlusAValue", - "identifiers": [ - { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 44, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 44, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "value", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 74, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 67, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 19 - } - } - } - ], - "range": [ - 63, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 44, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 35, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 44, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ] - }, - { - "name": "total", - "identifiers": [ - { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 113, - 114 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 25 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "optional": false, - "range": [ - 101, - 115 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "range": [ - 93, - 115 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "total", - "range": [ - 136, - 141 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 44, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 113, - 114 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "total", - "range": [ - 136, - 141 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "total", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "value", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 74, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 67, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 19 - } - } - } - ], - "range": [ - 63, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "yPlusAValue", - "range": [ - 44, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 35, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 167, - 168 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 167, - 168 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 221, - 222 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 221, - 222 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json index bfd7f5e3..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,817 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "num", - "identifiers": [ - { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "init": null, - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 120, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 126, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 153, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "squared", - "identifiers": [ - { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "num", - "range": [ - 120, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "num", - "range": [ - 126, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "range": [ - 120, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "range": [ - 110, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "squared", - "range": [ - 143, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - } - ] - }, - { - "name": "cubed", - "identifiers": [ - { - "type": "Identifier", - "name": "cubed", - "range": [ - 135, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "cubed", - "range": [ - 135, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "cubed", - "range": [ - 135, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "squared", - "range": [ - 143, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "num", - "range": [ - 153, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 143, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 135, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 120, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 126, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cubed", - "range": [ - 135, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "cubed", - "range": [ - 135, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "squared", - "range": [ - 143, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "squared", - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 153, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json index d03ae69e..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1148 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 67, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 67, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "optional": false, - "range": [ - 67, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "range": [ - 59, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 93, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 187, - 193 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 187, - 193 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 67, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 81, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 93, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 129, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 175, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 187, - 193 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 81, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 129, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 175, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 81, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 129, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 175, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json index fcbbbf3e..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,838 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "totalComponents", - "identifiers": [ - { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 31, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 193, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 235, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 328, - 343 - ], - "loc": { - "start": { - "line": 13, - "column": 71 - }, - "end": { - "line": 13, - "column": 86 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "name": "alertTotal", - "identifiers": [ - { - "type": "Identifier", - "name": "alertTotal", - "range": [ - 170, - 180 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "alertTotal", - "range": [ - 170, - 180 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 193, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 187, - 192 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 187, - 209 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 187, - 210 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - ], - "range": [ - 183, - 213 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "alertTotal", - "range": [ - 170, - 180 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "params": [], - "range": [ - 161, - 213 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 235, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 258, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 328, - 343 - ], - "loc": { - "start": { - "line": 13, - "column": 71 - }, - "end": { - "line": 13, - "column": 86 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 187, - 192 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 193, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 187, - 192 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 193, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalComponents", - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 187, - 192 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 258, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 187, - 192 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 258, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json index c6a1ab3d..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Widget", - "identifiers": [ - { - "type": "Identifier", - "name": "Widget", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Widget", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Widget", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 67, - 73 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Widget", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 67, - 73 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Widget", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json index 807785b8..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json index bc595ac7..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "clickable", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clickable", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clickable", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json index f843bd67..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json index bd4f854a..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "disabled", - "range": [ - 48, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "disabled", - "range": [ - 80, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "disabled", - "range": [ - 48, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "disabled", - "range": [ - 80, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "disabled", - "range": [ - 48, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "disabled", - "range": [ - 80, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json index 1e760ff1..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 13, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 13, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 13, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 13 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json index b0f85e07..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 12, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 12, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 12, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json index 2d300aae..22f3e21b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,134 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 12, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 12, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 12 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json index d567849b..7fc4ebba 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,64 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 11, - 22 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 11, - 22 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json index c1e4bc99..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 1, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 1, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 1, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json index da7e42dd..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,364 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 11, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 33, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 39, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 43, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 11, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 33, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 39, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 43, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 11, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 11 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 33, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 39, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 43, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json index b83b22e8..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 57, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 57, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 57, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json index 7d20324d..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,331 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 5, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 30, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 79, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 5, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 30, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 79, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 5, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 30, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 79, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json index ff0added..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,96 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 5, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 5, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 5, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json index 6b7932b4..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,179 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "porridge", - "range": [ - 5, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "porridge", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "porridge", - "range": [ - 5, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "porridge", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "porridge", - "range": [ - 5, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "porridge", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json index eb7001f1..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1617 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 44, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 88, - 98 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 131, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 181, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 25 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 29 - } - } - } - ], - "else": null, - "range": [ - 0, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 36 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 44, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 36 - } - } - } - ], - "else": null, - "range": [ - 37, - 80 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - } - ], - "references": [] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 44, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 36 - } - } - } - ], - "else": null, - "range": [ - 37, - 80 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 88, - 98 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "index": null, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 35 - } - } - } - ], - "else": null, - "range": [ - 81, - 123 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 42 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 131, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 4, - "column": 34 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 163, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 39 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "else": null, - "range": [ - 124, - 173 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 49 - } - } - } - } - ], - "references": [] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 131, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 151, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 4, - "column": 34 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 163, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 39 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "else": null, - "range": [ - 124, - 173 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 49 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 4, - "column": 34 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 4, - "column": 34 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "expression", - "range": [ - 181, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "name", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 200, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 26 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - ], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 210, - 213 - ], - "loc": { - "start": { - "line": 5, - "column": 36 - }, - "end": { - "line": 5, - "column": 39 - } - } - } - ], - "range": [ - 203, - 213 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "range": [ - 174, - 220 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 5, - "column": 46 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 44, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 88, - 98 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 131, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 4, - "column": 34 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 181, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 44, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 88, - 98 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 108, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 131, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 4, - "column": 34 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 181, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json index 0806d4b7..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,602 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 54, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 57, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 68, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 72, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "qty", - "range": [ - 77, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "range": [ - 71, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 30 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 81, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 35 - } - } - }, - "range": [ - 53, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 35 - } - } - } - ], - "else": null, - "range": [ - 29, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 72, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 72, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json index 260f6771..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1242 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 27, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 31, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 37, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 39, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 50, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 25 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "qty", - "range": [ - 59, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 34 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 54, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 53, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 43 - } - } - }, - "range": [ - 26, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - ], - "else": null, - "range": [ - 0, - 76 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 27, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 31, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 30, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 37, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 39, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 50, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 25 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "qty", - "range": [ - 59, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 34 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 54, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 53, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 43 - } - } - }, - "range": [ - 26, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - ], - "else": null, - "range": [ - 0, - 76 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json index 86f54016..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2146 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "index": null, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 27, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "range": [ - 22, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 34, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 38, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 43, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 37, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "qty", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 2, - "column": 25 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 51, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 34 - } - } - }, - "range": [ - 33, - 66 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 34 - } - } - } - ], - "else": null, - "range": [ - 0, - 74 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 38, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 38, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 138, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 141, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 146, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 141, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 153, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 157, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "range": [ - 156, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 163, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 166, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 166, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 165, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 176, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 25 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 180, - 184 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "qty", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 34 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 180, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 179, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - "range": [ - 152, - 194 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 43 - } - } - } - ], - "else": null, - "range": [ - 116, - 202 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 141, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 166, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 180, - 184 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 138, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 138, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 138, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 141, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 146, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 141, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 153, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 157, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "range": [ - 156, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 163, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 166, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 166, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 165, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 176, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 25 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 180, - 184 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "qty", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 34 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 180, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 179, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - "range": [ - 152, - 194 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 43 - } - } - } - ], - "else": null, - "range": [ - 116, - 202 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 157, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 138, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 141, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 157, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 138, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 166, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 180, - 184 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json index b39fa326..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,5252 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "objects", - "range": [ - 93, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "id", - "identifiers": [ - { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - ], - "range": [ - 16, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 38, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 45, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 48, - 55 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 55, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 63, - 66 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "qty", - "range": [ - 67, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 66, - 71 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "range": [ - 44, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "else": null, - "range": [ - 0, - 84 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "id", - "range": [ - 38, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ] - }, - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - ], - "range": [ - 16, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 38, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 45, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 48, - 55 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 55, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 63, - 66 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "qty", - "range": [ - 67, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 66, - 71 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "range": [ - 44, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "else": null, - "range": [ - 0, - 84 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - } - ] - }, - { - "name": "qty", - "identifiers": [ - { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - ], - "range": [ - 16, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 38, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 45, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 48, - 55 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 55, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 63, - 66 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "qty", - "range": [ - 67, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 66, - 71 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "range": [ - 44, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "else": null, - "range": [ - 0, - 84 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "qty", - "range": [ - 67, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - ], - "range": [ - 16, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 38, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 45, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 48, - 55 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 55, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - { - "type": "SvelteText", - "value": " x ", - "range": [ - 63, - 66 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "qty", - "range": [ - 67, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 66, - 71 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "range": [ - 44, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "else": null, - "range": [ - 0, - 84 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "id", - "range": [ - 38, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 38 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "id", - "range": [ - 18, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 18 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 49, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 35 - }, - "end": { - "line": 1, - "column": 36 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "qty", - "range": [ - 67, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "qty", - "range": [ - 28, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 31 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "id", - "identifiers": [ - { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "objects", - "range": [ - 93, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "context": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - { - "type": "RestElement", - "argument": { - "type": "Identifier", - "name": "rest", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 31 - } - } - }, - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 31 - } - } - } - ], - "range": [ - 104, - 119 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 33 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 123, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 122, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 127, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 126, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "id", - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 136, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 126, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 144, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteSpreadAttribute", - "argument": { - "type": "Identifier", - "name": "rest", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 39 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 6, - "column": 35 - }, - "end": { - "line": 6, - "column": 44 - } - } - } - ], - "selfClosing": true, - "range": [ - 143, - 167 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 143, - 167 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 46 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 46 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "range": [ - 122, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 51 - } - } - } - ], - "else": null, - "range": [ - 86, - 180 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 7, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "id", - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - } - ] - }, - { - "name": "rest", - "identifiers": [ - { - "type": "Identifier", - "name": "rest", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "rest", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 31 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "objects", - "range": [ - 93, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "context": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - { - "type": "RestElement", - "argument": { - "type": "Identifier", - "name": "rest", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 31 - } - } - }, - "range": [ - 110, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 31 - } - } - } - ], - "range": [ - 104, - 119 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 33 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 123, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 122, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 127, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 126, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "id", - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 136, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 126, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 144, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteSpreadAttribute", - "argument": { - "type": "Identifier", - "name": "rest", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 39 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 6, - "column": 35 - }, - "end": { - "line": 6, - "column": 44 - } - } - } - ], - "selfClosing": true, - "range": [ - 143, - 167 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 143, - 167 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 46 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 46 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "range": [ - 122, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 51 - } - } - } - ], - "else": null, - "range": [ - 86, - 180 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 7, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "rest", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 39 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "rest", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 31 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "id", - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "id", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "rest", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 39 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "rest", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 144, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 144, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "id", - "identifiers": [ - { - "type": "Identifier", - "name": "id", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "id", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "context": { - "type": "ArrayPattern", - "elements": [ - { - "type": "Identifier", - "name": "id", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 19 - } - } - }, - { - "type": "RestElement", - "argument": { - "type": "Identifier", - "name": "rest", - "range": [ - 206, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "range": [ - 203, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 28 - } - } - } - ], - "range": [ - 198, - 211 - ], - "loc": { - "start": { - "line": 9, - "column": 16 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 215, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 214, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 219, - 223 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 218, - 224 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "id", - "range": [ - 225, - 227 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "range": [ - 224, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 228, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 218, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 236, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 34 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "values", - "range": [ - 248, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 35 - }, - "end": { - "line": 10, - "column": 41 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "rest", - "range": [ - 256, - 260 - ], - "loc": { - "start": { - "line": 10, - "column": 43 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 255, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 42 - }, - "end": { - "line": 10, - "column": 48 - } - } - } - ], - "range": [ - 248, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 35 - }, - "end": { - "line": 10, - "column": 48 - } - } - } - ], - "selfClosing": true, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 50 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 50 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 263, - 268 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 55 - } - } - }, - "range": [ - 214, - 268 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 55 - } - } - } - ], - "else": null, - "range": [ - 182, - 276 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 11, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "id", - "range": [ - 225, - 227 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "id", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 19 - } - } - } - } - ] - }, - { - "name": "rest", - "identifiers": [ - { - "type": "Identifier", - "name": "rest", - "range": [ - 206, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "rest", - "range": [ - 206, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "context": { - "type": "ArrayPattern", - "elements": [ - { - "type": "Identifier", - "name": "id", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 19 - } - } - }, - { - "type": "RestElement", - "argument": { - "type": "Identifier", - "name": "rest", - "range": [ - 206, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "range": [ - 203, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 28 - } - } - } - ], - "range": [ - 198, - 211 - ], - "loc": { - "start": { - "line": 9, - "column": 16 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 215, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 214, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 219, - 223 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 218, - 224 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "id", - "range": [ - 225, - 227 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "range": [ - 224, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 228, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 218, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 236, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 34 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "values", - "range": [ - 248, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 35 - }, - "end": { - "line": 10, - "column": 41 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "rest", - "range": [ - 256, - 260 - ], - "loc": { - "start": { - "line": 10, - "column": 43 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 255, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 42 - }, - "end": { - "line": 10, - "column": 48 - } - } - } - ], - "range": [ - 248, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 35 - }, - "end": { - "line": 10, - "column": 48 - } - } - } - ], - "selfClosing": true, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 50 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 50 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 263, - 268 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 55 - } - } - }, - "range": [ - 214, - 268 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 55 - } - } - } - ], - "else": null, - "range": [ - 182, - 276 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 11, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "rest", - "range": [ - 256, - 260 - ], - "loc": { - "start": { - "line": 10, - "column": 43 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "rest", - "range": [ - 206, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 28 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "id", - "range": [ - 225, - 227 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "id", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "rest", - "range": [ - 256, - 260 - ], - "loc": { - "start": { - "line": 10, - "column": 43 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "rest", - "range": [ - 206, - 210 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 236, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 236, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "objects", - "range": [ - 93, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 144, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 236, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "objects", - "range": [ - 93, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 144, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComponent", - "range": [ - 236, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json index 70a353d3..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,549 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "todos", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 24, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 27, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 27, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 26, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 37, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 23, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 52, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 51, - 54 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "No tasks today!", - "range": [ - 54, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 51, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "range": [ - 42, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 0 - } - } - }, - "range": [ - 0, - 81 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 5, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 27, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 27, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 16, - 20 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 7, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json index 90e63b27..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,865 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 8, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 70, - 80 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 157, - 167 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 33 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 34, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 34 - }, - "end": { - "line": 1, - "column": 37 - } - } - } - ], - "range": [ - 22, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 37 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 1, - "column": 45 - }, - "end": { - "line": 1, - "column": 49 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 1, - "column": 45 - }, - "end": { - "line": 1, - "column": 49 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "name", - "range": [ - 45, - 49 - ], - "loc": { - "start": { - "line": 1, - "column": 45 - }, - "end": { - "line": 1, - "column": 49 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 50, - 53 - ], - "loc": { - "start": { - "line": 1, - "column": 50 - }, - "end": { - "line": 1, - "column": 53 - } - } - } - ], - "range": [ - 37, - 53 - ], - "loc": { - "start": { - "line": 1, - "column": 37 - }, - "end": { - "line": 1, - "column": 53 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 96, - 99 - ], - "loc": { - "start": { - "line": 2, - "column": 34 - }, - "end": { - "line": 2, - "column": 37 - } - } - } - ], - "range": [ - 84, - 99 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 37 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "name", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 137, - 140 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 108, - 140 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 174, - 178 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 174, - 178 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": true, - "error": { - "type": "Identifier", - "name": "name", - "range": [ - 174, - 178 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "...", - "range": [ - 179, - 182 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 33 - } - } - } - ], - "range": [ - 149, - 182 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 33 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 8, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 70, - 80 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 157, - 167 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 8, - 18 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 70, - 80 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 157, - 167 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json index 410df4db..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,883 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 99, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 99, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 99, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 105, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 5, - "column": 1 - } - } - }, - { - "type": "SvelteHTMLComment", - "value": " promise was fulfilled ", - "range": [ - 107, - 137 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 31 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 137, - 139 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 139, - 142 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The value is ", - "range": [ - 142, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "value", - "range": [ - 156, - 161 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 162, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 24 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "range": [ - 139, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 166, - 167 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - ], - "range": [ - 92, - 167 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 156, - 161 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 99, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 156, - 161 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 99, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 181, - 183 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - { - "type": "SvelteHTMLComment", - "value": " promise was rejected ", - "range": [ - 183, - 212 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 212, - 214 - ], - "loc": { - "start": { - "line": 8, - "column": 30 - }, - "end": { - "line": 9, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 215, - 216 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "Something went wrong: ", - "range": [ - 217, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 240, - 245 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 246, - 253 - ], - "loc": { - "start": { - "line": 9, - "column": 33 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 240, - 253 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 239, - 254 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 41 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 254, - 258 - ], - "loc": { - "start": { - "line": 9, - "column": 41 - }, - "end": { - "line": 9, - "column": 45 - } - } - }, - "range": [ - 214, - 258 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 45 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 258, - 259 - ], - "loc": { - "start": { - "line": 9, - "column": 45 - }, - "end": { - "line": 10, - "column": 0 - } - } - } - ], - "range": [ - 167, - 259 - ], - "loc": { - "start": { - "line": 7, - "column": 0 - }, - "end": { - "line": 10, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 240, - 245 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 240, - 245 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json index 4e6a8f05..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,471 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 5, - "column": 0 - } - } - }, - { - "type": "SvelteHTMLComment", - "value": " promise was fulfilled ", - "range": [ - 104, - 134 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 134, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 6, - "column": 0 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 135, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The value is ", - "range": [ - 138, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "value", - "range": [ - 152, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 151, - 158 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 23 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "range": [ - 135, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 162, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - ], - "range": [ - 90, - 163 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 152, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 152, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json index 74c28fa9..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,428 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 27, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 2, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 29, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The value is ", - "range": [ - 32, - 45 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "value", - "range": [ - 46, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 45, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 29, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 56, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 3, - "column": 0 - } - } - } - ], - "range": [ - 0, - 57 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 46, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 46, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json index 6eb86596..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,428 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": true, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 28, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 2, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 30, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The error is ", - "range": [ - 33, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "error", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 46, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 30, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 57, - 58 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 3, - "column": 0 - } - } - } - ], - "range": [ - 0, - 58 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 27 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 27 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 8, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json index 5caac2fe..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,96 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 6, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 6, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 6, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json index 1eee26b9..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,282 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 6, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 6, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 6, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json index 4b882ce4..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,190 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 6, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 15, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 15, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 6, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 15, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 6, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 6 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 15, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json index af8a524c..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 7, - 17 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json index f0e465c2..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "post", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "post", - "range": [ - 55, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "post", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "post", - "range": [ - 55, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "post", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "post", - "range": [ - 55, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json index 47d03c4f..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,295 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "var1", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "var2", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "v3", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "varN", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "var1", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "var2", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "v3", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "varN", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "var1", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "var2", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "v3", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "varN", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json index 930e32ef..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,476 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "user", - "identifiers": [ - { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "firstname", - "range": [ - 25, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Ada'", - "value": "Ada", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 25, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "lastname", - "range": [ - 45, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Lovelace'", - "value": "Lovelace", - "range": [ - 55, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 45, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "range": [ - 21, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 5, - "column": 2 - } - } - }, - "range": [ - 14, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 107, - 111 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 107, - 111 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json index b55c7569..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,295 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user1", - "range": [ - 40, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user2", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user3", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user1", - "range": [ - 40, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user2", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user3", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user1", - "range": [ - 40, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user2", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user3", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json index 4ff9185f..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,270 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "variable", - "identifiers": [ - { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "init": { - "type": "Identifier", - "name": "assignment", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "range": [ - 8, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 29 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "variable", - "range": [ - 8, - 16 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "assignment", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "assignment", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "assignment", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json index 04a7a76a..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1445 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "boxes", - "identifiers": [ - { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "init": null, - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "boxes", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "boxes", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "boxes", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "box", - "identifiers": [ - { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "boxes", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteConstTag", - "declaration": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "box", - "range": [ - 78, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 78, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "box", - "range": [ - 90, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 94, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 33 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 90, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 78, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 71, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 63, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 40 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 101, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 40 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "box", - "range": [ - 105, - 108 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 109, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 105, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": " * ", - "range": [ - 115, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "box", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 123, - 129 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "range": [ - 119, - 129 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "range": [ - 118, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": " = ", - "range": [ - 130, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "area", - "range": [ - 134, - 138 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 36 - } - } - }, - "range": [ - 133, - 139 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "else": null, - "range": [ - 40, - 147 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 78, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 90, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 105, - 108 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ] - }, - { - "name": "area", - "identifiers": [ - { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "box", - "range": [ - 78, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 78, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "box", - "range": [ - 90, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 94, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 33 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 90, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 78, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "range": [ - 71, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 39 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "area", - "range": [ - 134, - 138 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 78, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 90, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 105, - 108 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "box", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "box", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "area", - "range": [ - 134, - 138 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "area", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json index 1285483c..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json index 27a6e988..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,890 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 126, - 131 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 59, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "range": [ - 55, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - ], - "range": [ - 27, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 126, - 131 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 59, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 59, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "range": [ - 55, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - ], - "range": [ - 27, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 59, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json index 92149fe4..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,190 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 25, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 25, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 25, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 25, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 48, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json index 04f45e44..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 32, - 44 - ], - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 32, - 44 - ], - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 32, - 44 - ], - "loc": { - "start": { - "line": 1, - "column": 32 - }, - "end": { - "line": 1, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json index 438aaa3c..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1417 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "counter", - "identifiers": [ - { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 24, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 14, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 53, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 63, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "increment", - "identifiers": [ - { - "type": "Identifier", - "name": "increment", - "range": [ - 37, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "increment", - "range": [ - 37, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "counter", - "range": [ - 53, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "counter", - "range": [ - 63, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 73, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 63, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 53, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 53, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - ], - "range": [ - 49, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 5, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "increment", - "range": [ - 37, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "params": [], - "range": [ - 28, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "increment", - "range": [ - 157, - 166 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "increment", - "range": [ - 37, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ] - }, - { - "name": "track", - "identifiers": [ - { - "type": "Identifier", - "name": "track", - "range": [ - 90, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "track", - "range": [ - 90, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 118, - 123 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 18 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "trackEvent", - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 107, - 124 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "range": [ - 107, - 124 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "range": [ - 103, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "track", - "range": [ - 90, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 96, - 101 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 21 - } - } - } - ], - "range": [ - 81, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "track", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "track", - "range": [ - 90, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "increment", - "range": [ - 157, - 166 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "increment", - "range": [ - 37, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "track", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "track", - "range": [ - 90, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 53, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 63, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 53, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "counter", - "range": [ - 63, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "counter", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 96, - 101 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 96, - 101 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 118, - 123 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 18 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "trackEvent", - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 107, - 124 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "range": [ - 107, - 124 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "range": [ - 103, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "track", - "range": [ - 90, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 96, - 101 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 21 - } - } - } - ], - "range": [ - 81, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 118, - 123 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 96, - 101 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "trackEvent", - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 118, - 123 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 96, - 101 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "trackEvent", - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "trackEvent", - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "trackEvent", - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json index aa686834..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 20, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 20, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 20, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json index 8641abdd..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,226 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json index 8844edec..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 69, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 69, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 69, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json index 584430a8..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 33, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 32 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 33, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 32 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 33, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 33 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 32 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json index e309087c..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 91, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 91, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 91, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json index 70bbcadf..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,295 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 20, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 47, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 107, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 20, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 47, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 107, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 20, - 28 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 47, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 77, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 107, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json index a5dce38e..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json index a5dce38e..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json index 45c1e649..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 1, - "column": 44 - }, - "end": { - "line": 1, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 1, - "column": 44 - }, - "end": { - "line": 1, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 44, - 48 - ], - "loc": { - "start": { - "line": 1, - "column": 44 - }, - "end": { - "line": 1, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json index 40285ac4..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,985 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "clip", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "buffered", - "range": [ - 40, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "played", - "range": [ - 55, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 6 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seekable", - "range": [ - 68, - 76 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seeking", - "range": [ - 83, - 90 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ended", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "currentTime", - "range": [ - 109, - 120 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "playbackRate", - "range": [ - 127, - 139 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 146, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "volume", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "muted", - "range": [ - 172, - 177 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "videoWidth", - "range": [ - 184, - 194 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "videoHeight", - "range": [ - 201, - 212 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clip", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "buffered", - "range": [ - 40, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "played", - "range": [ - 55, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 6 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seekable", - "range": [ - 68, - 76 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seeking", - "range": [ - 83, - 90 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ended", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "currentTime", - "range": [ - 109, - 120 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "playbackRate", - "range": [ - 127, - 139 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 146, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "volume", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "muted", - "range": [ - 172, - 177 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "videoWidth", - "range": [ - 184, - 194 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "videoHeight", - "range": [ - 201, - 212 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clip", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "buffered", - "range": [ - 40, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "played", - "range": [ - 55, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 6 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seekable", - "range": [ - 68, - 76 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seeking", - "range": [ - 83, - 90 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ended", - "range": [ - 97, - 102 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "currentTime", - "range": [ - 109, - 120 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "playbackRate", - "range": [ - 127, - 139 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 146, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "volume", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "muted", - "range": [ - 172, - 177 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "videoWidth", - "range": [ - 184, - 194 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "videoHeight", - "range": [ - 201, - 212 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json index 2c844be0..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,364 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "width", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "height", - "range": [ - 51, - 57 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "width", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "height", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Chart", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "width", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "height", - "range": [ - 51, - 57 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "width", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "height", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Chart", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "width", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "height", - "range": [ - 51, - 57 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "width", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "height", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Chart", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json index 7a15d82b..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json index f0ba7760..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,941 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "tortilla", - "identifiers": [ - { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "init": { - "type": "Literal", - "raw": "'Plain'", - "value": "Plain", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 14, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 150, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 207, - 215 - ], - "loc": { - "start": { - "line": 8, - "column": 32 - }, - "end": { - "line": 8, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 270, - 278 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "fillings", - "identifiers": [ - { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [], - "range": [ - 50, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 39, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 384, - 392 - ], - "loc": { - "start": { - "line": 12, - "column": 35 - }, - "end": { - "line": 12, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 503, - 511 - ], - "loc": { - "start": { - "line": 14, - "column": 35 - }, - "end": { - "line": 14, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 564, - 572 - ], - "loc": { - "start": { - "line": 15, - "column": 35 - }, - "end": { - "line": 15, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 150, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 207, - 215 - ], - "loc": { - "start": { - "line": 8, - "column": 32 - }, - "end": { - "line": 8, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 270, - 278 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tortilla", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 384, - 392 - ], - "loc": { - "start": { - "line": 12, - "column": 35 - }, - "end": { - "line": 12, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 503, - 511 - ], - "loc": { - "start": { - "line": 14, - "column": 35 - }, - "end": { - "line": 14, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fillings", - "range": [ - 564, - 572 - ], - "loc": { - "start": { - "line": 15, - "column": 35 - }, - "end": { - "line": 15, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fillings", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json index cf3278b8..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dom_node", - "range": [ - 16, - 24 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dom_node", - "range": [ - 16, - 24 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dom_node", - "range": [ - 16, - 24 - ], - "loc": { - "start": { - "line": 1, - "column": 16 - }, - "end": { - "line": 1, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json index a7ec7460..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,925 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onMount", - "identifiers": [ - { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "canvasElement", - "identifiers": [ - { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "init": null, - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 182, - 195 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 182, - 195 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "ctx", - "identifiers": [ - { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'2d'", - "value": "2d", - "range": [ - 122, - 126 - ], - "loc": { - "start": { - "line": 7, - "column": 39 - }, - "end": { - "line": 7, - "column": 43 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getContext", - "range": [ - 111, - 121 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 38 - } - } - }, - "range": [ - 97, - 121 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 38 - } - } - }, - "optional": false, - "range": [ - 97, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "range": [ - 91, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 44 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 141, - 144 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "drawStuff", - "range": [ - 131, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 141, - 144 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvasElement", - "range": [ - 50, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "drawStuff", - "range": [ - 131, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "drawStuff", - "range": [ - 131, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "drawStuff", - "range": [ - 131, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json index 19e842f1..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 37, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 37, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 1, - "column": 17 - }, - "end": { - "line": 1, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 37, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json index 907d5cc0..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,433 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 177, - 183 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 254, - 260 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 278, - 284 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "isAdmin", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 9, - "column": 49 - }, - "end": { - "line": 9, - "column": 56 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 177, - 183 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 254, - 260 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 278, - 284 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "isAdmin", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 9, - "column": 49 - }, - "end": { - "line": 9, - "column": 56 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 177, - 183 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 254, - 260 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 278, - 284 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "isAdmin", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 9, - "column": 49 - }, - "end": { - "line": 9, - "column": 56 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json index 2f397f17..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "property", - "range": [ - 73, - 81 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "property", - "range": [ - 73, - 81 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "property", - "range": [ - 73, - 81 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json index fea43fde..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,295 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "myColor", - "range": [ - 148, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 310, - 315 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "darkMode", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 12, - "column": 61 - }, - "end": { - "line": 12, - "column": 69 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "myColor", - "range": [ - 148, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 310, - 315 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "darkMode", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 12, - "column": 61 - }, - "end": { - "line": 12, - "column": 69 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "myColor", - "range": [ - 148, - 155 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 310, - 315 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "darkMode", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 12, - "column": 61 - }, - "end": { - "line": 12, - "column": 69 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json index 8b795c32..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1402 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "action", - "identifiers": [ - { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "update", - "range": [ - 58, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "parameters", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "range": [ - 66, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "range": [ - 58, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 94, - 101 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 109, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 94, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "range": [ - 48, - 117 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "parameters", - "range": [ - 32, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "range": [ - 25, - 118 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "range": [ - 16, - 118 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "action", - "range": [ - 139, - 145 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "action", - "range": [ - 157, - 163 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "action", - "range": [ - 139, - 145 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "parameters", - "range": [ - 165, - 175 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "action", - "range": [ - 157, - 163 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "action", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "update", - "range": [ - 58, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "parameters", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "range": [ - 66, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "range": [ - 58, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 94, - 101 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 109, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 94, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "range": [ - 48, - 117 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "parameters", - "range": [ - 32, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "range": [ - 25, - 118 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - } - ], - "references": [] - }, - { - "name": "parameters", - "identifiers": [ - { - "type": "Identifier", - "name": "parameters", - "range": [ - 32, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "parameters", - "range": [ - 32, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "update", - "range": [ - 58, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "parameters", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "range": [ - 66, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "range": [ - 58, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 94, - 101 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 109, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 94, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "range": [ - 48, - 117 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "parameters", - "range": [ - 32, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "range": [ - 25, - 118 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "parameters", - "identifiers": [ - { - "type": "Identifier", - "name": "parameters", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "parameters", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "parameters", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - ], - "range": [ - 66, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 34 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "parameters", - "range": [ - 165, - 175 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "parameters", - "range": [ - 165, - 175 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json index 33b47392..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,607 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 98, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 95, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "range": [ - 88, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - } - ], - "range": [ - 83, - 154 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "range": [ - 76, - 155 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 9, - "column": 4 - } - } - } - ], - "range": [ - 29, - 158 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "range": [ - 10, - 158 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 179, - 182 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 179, - 182 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 98, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 95, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "range": [ - 88, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - } - ], - "range": [ - 83, - 154 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "range": [ - 76, - 155 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 9, - "column": 4 - } - } - } - ], - "range": [ - 29, - 158 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 23, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "range": [ - 10, - 158 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json index 2c394519..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1518 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "init": null, - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 269, - 272 - ], - "loc": { - "start": { - "line": 19, - "column": 14 - }, - "end": { - "line": 19, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "update", - "range": [ - 111, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 123, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "range": [ - 117, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "range": [ - 111, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 173, - 180 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 183, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 180, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "range": [ - 173, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 14, - "column": 4 - } - } - } - ], - "range": [ - 106, - 239 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 15, - "column": 3 - } - } - }, - "range": [ - 99, - 240 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 15, - "column": 4 - } - } - } - ], - "range": [ - 52, - 243 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 16, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 41, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "bar", - "range": [ - 47, - 50 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "range": [ - 28, - 243 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 16, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 264, - 267 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 269, - 272 - ], - "loc": { - "start": { - "line": 19, - "column": 14 - }, - "end": { - "line": 19, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 21, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 264, - 267 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 41, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 41, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "update", - "range": [ - 111, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 123, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "range": [ - 117, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "range": [ - 111, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 173, - 180 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 183, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 180, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "range": [ - 173, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 14, - "column": 4 - } - } - } - ], - "range": [ - 106, - 239 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 15, - "column": 3 - } - } - }, - "range": [ - 99, - 240 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 15, - "column": 4 - } - } - } - ], - "range": [ - 52, - 243 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 16, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 41, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "bar", - "range": [ - 47, - 50 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "range": [ - 28, - 243 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 16, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 47, - 50 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 47, - 50 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "update", - "range": [ - 111, - 117 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 123, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "range": [ - 117, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "range": [ - 111, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 173, - 180 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 183, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 180, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "range": [ - 173, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 14, - "column": 4 - } - } - } - ], - "range": [ - 106, - 239 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 15, - "column": 3 - } - } - }, - "range": [ - 99, - 240 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 15, - "column": 4 - } - } - } - ], - "range": [ - 52, - 243 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 16, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 37, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 41, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "bar", - "range": [ - 47, - 50 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "range": [ - 28, - 243 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 16, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "node": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 123, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "range": [ - 117, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 10, - "column": 4 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json index 2e67a917..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2908 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "transition", - "identifiers": [ - { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 57, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 62, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 72, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 62, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 77, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 92, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "range": [ - 85, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 77, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 97, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 112, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 102, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 97, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 117, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 47, - 137 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "range": [ - 28, - 138 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "range": [ - 15, - 138 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "transition", - "range": [ - 15, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 165, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 186, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 216, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 243, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 16 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 57, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 62, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 72, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 62, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 77, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 92, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "range": [ - 85, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 77, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 97, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 112, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 102, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 97, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 117, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 47, - 137 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "range": [ - 28, - 138 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 57, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 62, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 72, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 62, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 77, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 92, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "range": [ - 85, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 77, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 97, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 112, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 102, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 97, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 117, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 47, - 137 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 29, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "range": [ - 28, - 138 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 92, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "range": [ - 85, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 112, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 102, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ], - "references": [] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 112, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 106, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 102, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - } - ], - "references": [] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 133, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 124, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 165, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 186, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 216, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 243, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 16 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 165, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 186, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 216, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 243, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 16 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json index 72bbde39..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,190 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json index 72bbde39..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,190 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json index 32af4568..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,5129 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "elasticOut", - "identifiers": [ - { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "local": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 298, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "init": null, - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 398, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "whoosh", - "identifiers": [ - { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 179, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 69 - }, - "end": { - "line": 7, - "column": 75 - } - } - }, - { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 187, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 77 - }, - "end": { - "line": 7, - "column": 79 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 45 - }, - "end": { - "line": 7, - "column": 49 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "optional": false, - "range": [ - 138, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 161, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 51 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "range": [ - 138, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "replace", - "range": [ - 171, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "range": [ - 138, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "optional": false, - "range": [ - 138, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 118, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 80 - } - } - } - ], - "range": [ - 112, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 81 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 207, - 212 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "delay", - "range": [ - 221, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 214, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "operator": "||", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "range": [ - 214, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "range": [ - 207, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 236, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "duration", - "range": [ - 253, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "range": [ - 246, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "operator": "||", - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 265, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 246, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 236, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 273, - 279 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 281, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "easing", - "range": [ - 288, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 281, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "operator": "||", - "right": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 298, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "range": [ - 281, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "range": [ - 273, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: ", - "raw": "transform: " - }, - "range": [ - 328, - 342 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 359, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 49 - }, - "end": { - "line": 13, - "column": 59 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": ")", - "raw": ")" - }, - "range": [ - 370, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 60 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 328, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - } - ], - "range": [ - 318, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "range": [ - 313, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 202, - 377 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "range": [ - 195, - 378 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 14, - "column": 4 - } - } - } - ], - "range": [ - 108, - 381 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 15, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - ], - "range": [ - 78, - 381 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 15, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 416, - 422 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 398, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 179, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 69 - }, - "end": { - "line": 7, - "column": 75 - } - } - }, - { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 187, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 77 - }, - "end": { - "line": 7, - "column": 79 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 45 - }, - "end": { - "line": 7, - "column": 49 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "optional": false, - "range": [ - 138, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 161, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 51 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "range": [ - 138, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "replace", - "range": [ - 171, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "range": [ - 138, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "optional": false, - "range": [ - 138, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 118, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 80 - } - } - } - ], - "range": [ - 112, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 81 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 207, - 212 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "delay", - "range": [ - 221, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 214, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "operator": "||", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "range": [ - 214, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "range": [ - 207, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 236, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "duration", - "range": [ - 253, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "range": [ - 246, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "operator": "||", - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 265, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 246, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 236, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 273, - 279 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 281, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "easing", - "range": [ - 288, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 281, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "operator": "||", - "right": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 298, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "range": [ - 281, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "range": [ - 273, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: ", - "raw": "transform: " - }, - "range": [ - 328, - 342 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 359, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 49 - }, - "end": { - "line": 13, - "column": 59 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": ")", - "raw": ")" - }, - "range": [ - 370, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 60 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 328, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - } - ], - "range": [ - 318, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "range": [ - 313, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 202, - 377 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "range": [ - 195, - 378 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 14, - "column": 4 - } - } - } - ], - "range": [ - 108, - 381 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 15, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - ], - "range": [ - 78, - 381 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 15, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 45 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - } - ] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 179, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 69 - }, - "end": { - "line": 7, - "column": 75 - } - } - }, - { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 187, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 77 - }, - "end": { - "line": 7, - "column": 79 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 45 - }, - "end": { - "line": 7, - "column": 49 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "optional": false, - "range": [ - 138, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 161, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 51 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "range": [ - 138, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "replace", - "range": [ - 171, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "range": [ - 138, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "optional": false, - "range": [ - 138, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 118, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 80 - } - } - } - ], - "range": [ - 112, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 81 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 207, - 212 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "delay", - "range": [ - 221, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 214, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "operator": "||", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "range": [ - 214, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "range": [ - 207, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 236, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "duration", - "range": [ - 253, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "range": [ - 246, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "operator": "||", - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 265, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 246, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 236, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 273, - 279 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "LogicalExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "params", - "range": [ - 281, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "easing", - "range": [ - 288, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 281, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "operator": "||", - "right": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 298, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "range": [ - 281, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "range": [ - 273, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: ", - "raw": "transform: " - }, - "range": [ - 328, - 342 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 359, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 49 - }, - "end": { - "line": 13, - "column": 59 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": ")", - "raw": ")" - }, - "range": [ - 370, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 60 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 328, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - } - ], - "range": [ - 318, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "range": [ - 313, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 202, - 377 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "range": [ - 195, - 378 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 14, - "column": 4 - } - } - } - ], - "range": [ - 108, - 381 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 15, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - ], - "range": [ - 78, - 381 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 15, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 281, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - } - ] - }, - { - "name": "existingTransform", - "identifiers": [ - { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 179, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 69 - }, - "end": { - "line": 7, - "column": 75 - } - } - }, - { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 187, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 77 - }, - "end": { - "line": 7, - "column": 79 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 45 - }, - "end": { - "line": 7, - "column": 49 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "optional": false, - "range": [ - 138, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 161, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 51 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "range": [ - 138, - 170 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "replace", - "range": [ - 171, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "range": [ - 138, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 68 - } - } - }, - "optional": false, - "range": [ - 138, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 118, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 80 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 45 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 94, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 281, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 11 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 298, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: ", - "raw": "transform: " - }, - "range": [ - 328, - 342 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 359, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 49 - }, - "end": { - "line": 13, - "column": 59 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": ")", - "raw": ")" - }, - "range": [ - 370, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 60 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 328, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - } - ], - "range": [ - 318, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - } - } - ] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: ", - "raw": "transform: " - }, - "range": [ - 328, - 342 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 359, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 49 - }, - "end": { - "line": 13, - "column": 59 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": ")", - "raw": ")" - }, - "range": [ - 370, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 60 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - ], - "range": [ - 328, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 13 - } - } - } - ], - "range": [ - 318, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 63 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 59 - }, - "end": { - "line": 13, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 319, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 342, - 359 - ], - "loc": { - "start": { - "line": 13, - "column": 32 - }, - "end": { - "line": 13, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "existingTransform", - "range": [ - 118, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 298, - 308 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 416, - 422 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 416, - 422 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whoosh", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 138, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json index 6dd03101..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,8783 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 31, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 21, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 443, - 450 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "typewriter", - "identifiers": [ - { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 110, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 105, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 121, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 105, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 105, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 145, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 140, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 140, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 159, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 140, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 177, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 172, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 140, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 105, - 186 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 92, - 190 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 86, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 214, - 216 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "range": [ - 207, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 199, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 195, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 239, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 234, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 227, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 31 - } - } - } - ], - "range": [ - 221, - 251 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 276, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 271, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 285, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 271, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 260, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - ], - "range": [ - 254, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 355, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 355, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 353, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 352, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 348, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 342, - 372 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 382, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 377, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 407, - 408 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 401, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 396, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 396, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 413 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 336, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 19 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "range": [ - 326, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 320, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 302, - 422 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 295, - 423 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 82, - 426 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 76, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 66, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - ], - "range": [ - 40, - 426 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 459, - 469 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 443, - 450 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 110, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 105, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 121, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 105, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 105, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 145, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 140, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 140, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 159, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 140, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 177, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 172, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 140, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 105, - 186 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 92, - 190 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 86, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 214, - 216 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "range": [ - 207, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 199, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 195, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 239, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 234, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 227, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 31 - } - } - } - ], - "range": [ - 221, - 251 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 276, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 271, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 285, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 271, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 260, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - ], - "range": [ - 254, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 355, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 355, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 353, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 352, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 348, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 342, - 372 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 382, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 377, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 407, - 408 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 401, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 396, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 396, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 413 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 336, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 19 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "range": [ - 326, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 320, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 302, - 422 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 295, - 423 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 82, - 426 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 76, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 66, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - ], - "range": [ - 40, - 426 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ] - }, - { - "name": "speed", - "identifiers": [ - { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 110, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 105, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 121, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 105, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 105, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 145, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 140, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 140, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 159, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 140, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 177, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 172, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 140, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 105, - 186 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 92, - 190 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 86, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 214, - 216 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "range": [ - 207, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 199, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 195, - 217 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 239, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 234, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 227, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 31 - } - } - } - ], - "range": [ - 221, - 251 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 276, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 271, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 285, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 271, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 260, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - ], - "range": [ - 254, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 355, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 355, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 353, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 352, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 348, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 342, - 372 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 382, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 377, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 407, - 408 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 401, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 396, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 396, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 413 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 336, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 19 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "range": [ - 326, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 320, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 302, - 422 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 295, - 423 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 82, - 426 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 76, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 66, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - ], - "range": [ - 40, - 426 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 285, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - } - ] - }, - { - "name": "valid", - "identifiers": [ - { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 110, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 105, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 121, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 105, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 105, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 145, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 140, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 140, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 159, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 140, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 177, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 172, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 140, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 105, - 186 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 92, - 190 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 239, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 234, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 227, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - } - ] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 276, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 271, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 285, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 271, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 260, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 285, - 290 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 307, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 355, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 355, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 353, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 352, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 348, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 342, - 372 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 382, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 377, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 407, - 408 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 401, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 396, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 396, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 413 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 336, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 19 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "range": [ - 326, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - } - ] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 355, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 355, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 353, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 352, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 348, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 342, - 372 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 382, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 377, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 407, - 408 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 401, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 396, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 396, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 412 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 377, - 413 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 336, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 19 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "range": [ - 326, - 418 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - } - ], - "references": [] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 355, - 366 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 355, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 353, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 352, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 348, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 369, - 370 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 410, - 411 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 348, - 349 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 355, - 359 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 459, - 469 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 459, - 469 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 49, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 172, - 176 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json index e29a560a..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,10542 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 49, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 31, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 489, - 496 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ] - }, - { - "name": "typewriter", - "identifiers": [ - { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 140, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 135, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 135, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 162, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 135, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 175, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 170, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 186, - 187 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 170, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 189, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 170, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 207, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 202, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 170, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 135, - 216 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 122, - 220 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 116, - 221 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 244, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "range": [ - 237, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 230, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 229, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 225, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "TSNonNullExpression", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 269, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - "range": [ - 257, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 32 - } - } - } - ], - "range": [ - 251, - 282 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 302, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 307, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 302, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 302, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 291, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - ], - "range": [ - 285, - 322 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 406, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 401, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 401, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 399, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 398, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 394, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 388, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 428, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 423, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 447, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 442, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 442, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 459 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 382, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 34 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "range": [ - 357, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 351, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 333, - 468 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 326, - 469 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 112, - 472 - ], - "loc": { - "start": { - "line": 4, - "column": 55 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 49 - }, - "end": { - "line": 4, - "column": 51 - } - } - }, - "range": [ - 98, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 51 - } - } - }, - "range": [ - 98, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 51 - } - } - } - ], - "range": [ - 96, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 39 - }, - "end": { - "line": 4, - "column": 53 - } - } - } - ], - "range": [ - 58, - 472 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 505, - 515 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 489, - 496 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSBooleanKeyword", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 38, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 31, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 140, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 135, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 135, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 162, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 135, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 175, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 170, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 186, - 187 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 170, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 189, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 170, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 207, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 202, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 170, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 135, - 216 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 122, - 220 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 116, - 221 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 244, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "range": [ - 237, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 230, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 229, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 225, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "TSNonNullExpression", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 269, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - "range": [ - 257, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 32 - } - } - } - ], - "range": [ - 251, - 282 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 302, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 307, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 302, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 302, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 291, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - ], - "range": [ - 285, - 322 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 406, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 401, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 401, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 399, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 398, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 394, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 388, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 428, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 423, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 447, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 442, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 442, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 459 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 382, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 34 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "range": [ - 357, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 351, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 333, - 468 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 326, - 469 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 112, - 472 - ], - "loc": { - "start": { - "line": 4, - "column": 55 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 49 - }, - "end": { - "line": 4, - "column": 51 - } - } - }, - "range": [ - 98, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 51 - } - } - }, - "range": [ - 98, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 51 - } - } - } - ], - "range": [ - 96, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 39 - }, - "end": { - "line": 4, - "column": 53 - } - } - } - ], - "range": [ - 58, - 472 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - } - ] - }, - { - "name": "speed", - "identifiers": [ - { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 140, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 135, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 135, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 162, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 135, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 175, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 170, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 186, - 187 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 170, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 189, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 170, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 207, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 202, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 170, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 135, - 216 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 122, - 220 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 116, - 221 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 244, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "range": [ - 237, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 230, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 229, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 225, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "TSNonNullExpression", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 269, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - "range": [ - 257, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 32 - } - } - } - ], - "range": [ - 251, - 282 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 302, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 307, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 302, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 302, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 291, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - ], - "range": [ - 285, - 322 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 406, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 401, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 401, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 399, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 398, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 394, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 388, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 428, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 423, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 447, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 442, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 442, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 459 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 382, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 34 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "range": [ - 357, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 351, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 333, - 468 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 326, - 469 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 112, - 472 - ], - "loc": { - "start": { - "line": 4, - "column": 55 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 49 - }, - "end": { - "line": 4, - "column": 51 - } - } - }, - "range": [ - 98, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 51 - } - } - }, - "range": [ - 98, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 51 - } - } - } - ], - "range": [ - 96, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 39 - }, - "end": { - "line": 4, - "column": 53 - } - } - } - ], - "range": [ - 58, - 472 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - } - ] - }, - { - "name": "valid", - "identifiers": [ - { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 140, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 135, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 135, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 162, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 135, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 175, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 170, - 185 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 186, - 187 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 170, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 189, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 170, - 197 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 207, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 202, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 170, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 135, - 216 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 122, - 220 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 230, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "TSNonNullExpression", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 269, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 20 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 264, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 32 - } - } - }, - "range": [ - 257, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 302, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - } - ] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 302, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 307, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 302, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 302, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 291, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 230, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 302, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 19 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 33 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 41 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 338, - 346 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 291, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 406, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 401, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 401, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 399, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 398, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 394, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 388, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 428, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 423, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 447, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 442, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 442, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 459 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 382, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 34 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "range": [ - 357, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - } - } - ] - }, - { - "name": "_u", - "identifiers": [ - { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 406, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 401, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 401, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 399, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 398, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 394, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "range": [ - 388, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 428, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "range": [ - 423, - 439 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 19, - "column": 34 - }, - "end": { - "line": 19, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 447, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 28 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "range": [ - 442, - 452 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 442, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 458 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 39 - } - } - }, - "range": [ - 423, - 459 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 40 - } - } - } - ], - "range": [ - 382, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 34 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "Identifier", - "name": "_u", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 371, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 370, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "range": [ - 368, - 377 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 29 - } - } - } - ], - "range": [ - 357, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - } - ], - "references": [] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 406, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "range": [ - 401, - 412 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "range": [ - 401, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 399, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 398, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 394, - 417 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 31 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 360, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 359, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 358, - 366 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 456, - 457 - ], - "loc": { - "start": { - "line": 19, - "column": 37 - }, - "end": { - "line": 19, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 394, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 401, - 405 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 82, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 78, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 442, - 446 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 257, - 261 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 505, - 515 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 505, - 515 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 202, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json index d51a8d5a..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,687 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 237, - 243 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 237, - 243 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 237, - 243 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 237, - 243 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 31, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 141, - 147 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 190, - 196 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 237, - 243 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json index c7d4cb06..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,430 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 5, - 6 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 5, - 6 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 5, - 6 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 102, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 16 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json index bec1c1cf..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,847 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 8, - 10 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 25, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 21, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 43, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 62, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 91, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 109, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 105, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 128, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 148, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 8, - 10 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 25, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 21, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 43, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 62, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 91, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 109, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 105, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 128, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 148, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 8, - 10 - ], - "loc": { - "start": { - "line": 1, - "column": 8 - }, - "end": { - "line": 1, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 25, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 21, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 43, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 62, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 91, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 109, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 105, - 107 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 128, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fn", - "range": [ - 148, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json index 72fddc7c..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,282 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 5, - 12 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json index 8969f069..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4512 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "animation", - "identifiers": [ - { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 94, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "range": [ - 94, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 116, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "range": [ - 143, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 178, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 202 - ], - "loc": { - "start": { - "line": 2, - "column": 56 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - ], - "range": [ - 38, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - ], - "range": [ - 31, - 203 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "range": [ - 19, - 203 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "animation", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 94, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "range": [ - 94, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 116, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "range": [ - 143, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 178, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 202 - ], - "loc": { - "start": { - "line": 2, - "column": 56 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - ], - "range": [ - 38, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - ], - "range": [ - 31, - 203 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ], - "references": [] - }, - { - "name": "from", - "identifiers": [ - { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 94, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "range": [ - 94, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 116, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "range": [ - 143, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 178, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 202 - ], - "loc": { - "start": { - "line": 2, - "column": 56 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - ], - "range": [ - 38, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - ], - "range": [ - 31, - 203 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ], - "references": [] - }, - { - "name": "to", - "identifiers": [ - { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 94, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "range": [ - 94, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 116, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "range": [ - 143, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 178, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 202 - ], - "loc": { - "start": { - "line": 2, - "column": 56 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - ], - "range": [ - 38, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - ], - "range": [ - 31, - 203 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ], - "references": [] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 94, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "range": [ - 94, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 116, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "range": [ - 143, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 178, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 202 - ], - "loc": { - "start": { - "line": 2, - "column": 56 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 32, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 40, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - ], - "range": [ - 38, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 44 - }, - "end": { - "line": 2, - "column": 50 - } - } - } - ], - "range": [ - 31, - 203 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - } - } - ], - "references": [] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "'foo :bar'", - "value": "foo :bar", - "range": [ - 158, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 152, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "range": [ - 148, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 33 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - } - ], - "references": [] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 185, - 186 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "range": [ - 184, - 196 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json index 66623446..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,962 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 93, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 104, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "modifiers": [], - "range": [ - 96, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "expression": null, - "range": [ - 96, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - ], - "selfClosing": false, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 110, - 114 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "range": [ - 109, - 115 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 115, - 120 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 92, - 120 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "else": null, - "range": [ - 56, - 128 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 110, - 114 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 93, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 104, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "modifiers": [], - "range": [ - 96, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "expression": null, - "range": [ - 96, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - ], - "selfClosing": false, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 110, - 114 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "range": [ - 109, - 115 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 115, - 120 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 92, - 120 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "else": null, - "range": [ - 56, - 128 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 7 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 2, - "column": 28 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 104, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 110, - 114 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 104, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 104, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 104, - 108 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json index 45f3de32..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1114 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 7, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 7, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 37, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "modifiers": [], - "range": [ - 40, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 64, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 57, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "range": [ - 55, - 69 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 34 - } - } - }, - "range": [ - 40, - 71 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 36 - } - } - } - ], - "selfClosing": false, - "range": [ - 36, - 72 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 42 - } - } - }, - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 2, - "column": 43 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 36, - 83 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 48 - } - } - } - ], - "else": null, - "range": [ - 0, - 91 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 42 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - } - } - ] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 7, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 1, - "column": 21 - }, - "end": { - "line": 1, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 37, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "modifiers": [], - "range": [ - 40, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 64, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 57, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "range": [ - 55, - 69 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 34 - } - } - }, - "range": [ - 40, - 71 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 36 - } - } - } - ], - "selfClosing": false, - "range": [ - 36, - 72 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 42 - } - } - }, - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 2, - "column": 37 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 2, - "column": 43 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 36, - 83 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 2, - "column": 48 - } - } - } - ], - "else": null, - "range": [ - 0, - 91 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 42 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 15, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 15 - }, - "end": { - "line": 1, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 7, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 7, - 11 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json index 0f63ed38..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,12265 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "cubicOut", - "identifiers": [ - { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "whizz", - "identifiers": [ - { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 231, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 252, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "range": [ - 247, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 247, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 247, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 237, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 270, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 270, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 291, - 294 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "range": [ - 291, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 219, - 383 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "range": [ - 212, - 384 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - ], - "range": [ - 97, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "whizz", - "range": [ - 448, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 406, - 410 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 231, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 252, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "range": [ - 247, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 247, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 247, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 237, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 270, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 270, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 291, - 294 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "range": [ - 291, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 219, - 383 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "range": [ - 212, - 384 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - ], - "range": [ - 97, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "from", - "identifiers": [ - { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 231, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 252, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "range": [ - 247, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 247, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 247, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 237, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 270, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 270, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 291, - 294 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "range": [ - 291, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 219, - 383 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "range": [ - 212, - 384 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - ], - "range": [ - 97, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - } - ] - }, - { - "name": "to", - "identifiers": [ - { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 231, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 252, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "range": [ - 247, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 247, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 247, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 237, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 270, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 270, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 291, - 294 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "range": [ - 291, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 219, - 383 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "range": [ - 212, - 384 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - ], - "range": [ - 97, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - } - ] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 231, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 252, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "range": [ - 247, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 247, - 259 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 247, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "range": [ - 237, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 270, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 270, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 291, - 294 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "range": [ - 291, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 219, - 383 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "range": [ - 212, - 384 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - ], - "range": [ - 97, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 387 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "dx", - "identifiers": [ - { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - } - ] - }, - { - "name": "dy", - "identifiers": [ - { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - } - ] - }, - { - "name": "d", - "identifiers": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 257, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "range": [ - 347, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 63 - }, - "end": { - "line": 16, - "column": 66 - } - } - }, - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 66 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "transform: translate(", - "raw": "transform: translate(" - }, - "range": [ - 310, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px, ", - "raw": "px, " - }, - "range": [ - 340, - 347 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "px) rotate(", - "raw": "px) rotate(" - }, - "range": [ - 353, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 47 - }, - "end": { - "line": 16, - "column": 61 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "deg);", - "raw": "deg);" - }, - "range": [ - 372, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 66 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - ], - "range": [ - 310, - 379 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 296, - 379 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 16, - "column": 73 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "u", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 28 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "u", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 16, - "column": 41 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "u", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 367, - 368 - ], - "loc": { - "start": { - "line": 16, - "column": 61 - }, - "end": { - "line": 16, - "column": 62 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 338, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 32 - }, - "end": { - "line": 16, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 351, - 353 - ], - "loc": { - "start": { - "line": 16, - "column": 45 - }, - "end": { - "line": 16, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 278, - 286 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 406, - 410 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 420, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 427, - 431 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 436, - 439 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "whizz", - "range": [ - 448, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "modifiers": [], - "range": [ - 440, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 6 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "expression": null, - "range": [ - 440, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 6 - }, - "end": { - "line": 22, - "column": 19 - } - } - } - ], - "selfClosing": false, - "range": [ - 435, - 454 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 20 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 455, - 459 - ], - "loc": { - "start": { - "line": 22, - "column": 21 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "range": [ - 454, - 460 - ], - "loc": { - "start": { - "line": 22, - "column": 20 - }, - "end": { - "line": 22, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 460, - 466 - ], - "loc": { - "start": { - "line": 22, - "column": 26 - }, - "end": { - "line": 22, - "column": 32 - } - } - }, - "range": [ - 435, - 466 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 32 - } - } - } - ], - "else": null, - "range": [ - 399, - 474 - ], - "loc": { - "start": { - "line": 21, - "column": 0 - }, - "end": { - "line": 23, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 427, - 431 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 455, - 459 - ], - "loc": { - "start": { - "line": 22, - "column": 21 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - } - } - ] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 420, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 420, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 26 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 406, - 410 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 420, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 427, - 431 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 436, - 439 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "whizz", - "range": [ - 448, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "modifiers": [], - "range": [ - 440, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 6 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "expression": null, - "range": [ - 440, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 6 - }, - "end": { - "line": 22, - "column": 19 - } - } - } - ], - "selfClosing": false, - "range": [ - 435, - 454 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 20 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 455, - 459 - ], - "loc": { - "start": { - "line": 22, - "column": 21 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "range": [ - 454, - 460 - ], - "loc": { - "start": { - "line": 22, - "column": 20 - }, - "end": { - "line": 22, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 460, - 466 - ], - "loc": { - "start": { - "line": 22, - "column": 26 - }, - "end": { - "line": 22, - "column": 32 - } - } - }, - "range": [ - 435, - 466 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 32 - } - } - } - ], - "else": null, - "range": [ - 399, - 474 - ], - "loc": { - "start": { - "line": 21, - "column": 0 - }, - "end": { - "line": 23, - "column": 7 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 427, - 431 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "whizz", - "range": [ - 448, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 455, - 459 - ], - "loc": { - "start": { - "line": 22, - "column": 21 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 414, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 15 - }, - "end": { - "line": 21, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "whizz", - "range": [ - 448, - 453 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 406, - 410 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 247, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 406, - 410 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json index 65418939..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,12282 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "cubicOut", - "identifiers": [ - { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "whizz", - "identifiers": [ - { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 223, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 9 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "range": [ - 223, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "range": [ - 245, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 245, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 260, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 245, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 267, - 273 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "range": [ - 267, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 287, - 291 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 287, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 219, - 379 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "range": [ - 212, - 380 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 19, - "column": 3 - } - } - } - ], - "range": [ - 97, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 20, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "whizz", - "range": [ - 444, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 402, - 406 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 223, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 9 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "range": [ - 223, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "range": [ - 245, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 245, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 260, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 245, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 267, - 273 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "range": [ - 267, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 287, - 291 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 287, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 219, - 379 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "range": [ - 212, - 380 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 19, - "column": 3 - } - } - } - ], - "range": [ - 97, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 20, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - }, - { - "name": "from", - "identifiers": [ - { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 223, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 9 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "range": [ - 223, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "range": [ - 245, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 245, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 260, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 245, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 267, - 273 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "range": [ - 267, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 287, - 291 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 287, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 219, - 379 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "range": [ - 212, - 380 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 19, - "column": 3 - } - } - } - ], - "range": [ - 97, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 20, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - } - ] - }, - { - "name": "to", - "identifiers": [ - { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 223, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 9 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "range": [ - 223, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "range": [ - 245, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 245, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 260, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 245, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 267, - 273 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "range": [ - 267, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 287, - 291 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 287, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 219, - 379 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "range": [ - 212, - 380 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 19, - "column": 3 - } - } - } - ], - "range": [ - 97, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 20, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - } - ] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - ], - "range": [ - 102, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 33 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - ], - "range": [ - 136, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 169, - 208 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 41 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 223, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 230, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 9 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "range": [ - 223, - 231 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "range": [ - 245, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 245, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 260, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 245, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "range": [ - 235, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 267, - 273 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "range": [ - 267, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 287, - 291 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 287, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 219, - 379 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "range": [ - 212, - 380 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 19, - "column": 3 - } - } - } - ], - "range": [ - 97, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - ], - "range": [ - 75, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 4, - "column": 36 - }, - "end": { - "line": 4, - "column": 42 - } - } - } - ], - "range": [ - 54, - 383 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 20, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "dx", - "identifiers": [ - { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 113, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "left", - "range": [ - 128, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 125, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 113, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 32 - } - } - }, - "range": [ - 108, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - } - ] - }, - { - "name": "dy", - "identifiers": [ - { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 152, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "range": [ - 147, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "top", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 158, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 147, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 142, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - } - ] - }, - { - "name": "d", - "identifiers": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "range": [ - 189, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 199, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 189, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 179, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 179, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 175, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 125, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "from", - "range": [ - 147, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "from", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "to", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "to", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 189, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dx", - "range": [ - 194, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dx", - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 199, - 201 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 9, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dy", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dy", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 255, - 256 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ] - }, - { - "name": "u", - "identifiers": [ - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "style", - "range": [ - 325, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 338, - 343 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'Blue'", - "value": "Blue", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 30 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "'Pink'", - "value": "Pink", - "range": [ - 355, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "0.5", - "value": 0.5, - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 352 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "range": [ - 345, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 36 - } - } - }, - "range": [ - 338, - 370 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 36 - } - } - } - ], - "range": [ - 332, - 375 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "assign", - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "range": [ - 306, - 319 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 306, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "u", - "range": [ - 297, - 298 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 293, - 376 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 345, - 346 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 320, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 17 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 69, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 402, - 406 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 416, - 421 - ], - "loc": { - "start": { - "line": 23, - "column": 21 - }, - "end": { - "line": 23, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 23, - "column": 28 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 432, - 435 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "whizz", - "range": [ - 444, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "modifiers": [], - "range": [ - 436, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 6 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "expression": null, - "range": [ - 436, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 6 - }, - "end": { - "line": 24, - "column": 19 - } - } - } - ], - "selfClosing": false, - "range": [ - 431, - 450 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 451, - 455 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "range": [ - 450, - 456 - ], - "loc": { - "start": { - "line": 24, - "column": 20 - }, - "end": { - "line": 24, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 456, - 462 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 32 - } - } - }, - "range": [ - 431, - 462 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 32 - } - } - } - ], - "else": null, - "range": [ - 395, - 470 - ], - "loc": { - "start": { - "line": 23, - "column": 0 - }, - "end": { - "line": 25, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 23, - "column": 28 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 451, - 455 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - } - } - ] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 416, - 421 - ], - "loc": { - "start": { - "line": 23, - "column": 21 - }, - "end": { - "line": 23, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 416, - 421 - ], - "loc": { - "start": { - "line": 23, - "column": 21 - }, - "end": { - "line": 23, - "column": 26 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 402, - 406 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 416, - 421 - ], - "loc": { - "start": { - "line": 23, - "column": 21 - }, - "end": { - "line": 23, - "column": 26 - } - } - }, - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 23, - "column": 28 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 432, - 435 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "whizz", - "range": [ - 444, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "modifiers": [], - "range": [ - 436, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 6 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "expression": null, - "range": [ - 436, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 6 - }, - "end": { - "line": 24, - "column": 19 - } - } - } - ], - "selfClosing": false, - "range": [ - 431, - 450 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 451, - 455 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "range": [ - 450, - 456 - ], - "loc": { - "start": { - "line": 24, - "column": 20 - }, - "end": { - "line": 24, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 456, - 462 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 32 - } - } - }, - "range": [ - 431, - 462 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 32 - } - } - } - ], - "else": null, - "range": [ - 395, - 470 - ], - "loc": { - "start": { - "line": 23, - "column": 0 - }, - "end": { - "line": 25, - "column": 7 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 423, - 427 - ], - "loc": { - "start": { - "line": 23, - "column": 28 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "whizz", - "range": [ - 444, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 451, - 455 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 410, - 414 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "whizz", - "range": [ - 444, - 449 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "whizz", - "range": [ - 63, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 402, - 406 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 245, - 249 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Object", - "range": [ - 306, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 402, - 406 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json index e2277126..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 22, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 22, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 22, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json index 4a981aae..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 28, - 35 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "SomeComponent", - "range": [ - 1, - 14 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 28, - 35 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "SomeComponent", - "range": [ - 1, - 14 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 28, - 35 - ], - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "SomeComponent", - "range": [ - 1, - 14 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json index fc061114..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "SomeComponent", - "range": [ - 1, - 14 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "SomeComponent", - "range": [ - 1, - 14 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "SomeComponent", - "range": [ - 1, - 14 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json index c75553c7..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 15, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 15, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 15, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json index bbcdc522..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 100, - 105 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 100, - 105 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 100, - 105 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json index 378dc4ff..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 137, - 143 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 137, - 143 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Slider", - "range": [ - 137, - 143 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json index c162c11a..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 23, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 23, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 23, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json index 211fc75b..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 20, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 20, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 20, - 23 - ], - "loc": { - "start": { - "line": 1, - "column": 20 - }, - "end": { - "line": 1, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json index fb3fd861..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "component_instance", - "range": [ - 19, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "component_instance", - "range": [ - 19, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "component_instance", - "range": [ - 19, - 37 - ], - "loc": { - "start": { - "line": 1, - "column": 19 - }, - "end": { - "line": 1, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyComp", - "range": [ - 1, - 7 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json index 66f96972..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,259 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 25, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ShoppingCart", - "range": [ - 1, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 25, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ShoppingCart", - "range": [ - 1, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 25, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ShoppingCart", - "range": [ - 1, - 13 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cart", - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json index 39523a9c..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json index dd690bb9..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 171, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 171, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 171, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 246, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json index ed632d37..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json index 6accfc46..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "HeaderComponent", - "range": [ - 195, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "HeaderComponent", - "range": [ - 195, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "HeaderComponent", - "range": [ - 195, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json index 254773f0..1651849e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,142 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 61, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Card", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 61, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Card", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Card", - "range": [ - 250, - 254 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json index d7355484..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1281 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 149, - 158 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 57, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "fancy", - "range": [ - 67, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - ], - "range": [ - 60, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "selfClosing": false, - "range": [ - 56, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 74, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "slot", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "prop", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 90, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 20 - } - } - } - ], - "range": [ - 84, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 20 - } - } - } - ], - "selfClosing": false, - "range": [ - 78, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 3 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "children": [], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 96, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 28 - } - } - }, - "range": [ - 78, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 3 - }, - "end": { - "line": 5, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 103, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 28 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 106, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "range": [ - 56, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - } - ], - "else": null, - "range": [ - 32, - 120 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 90, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 90, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "thing", - "identifiers": [ - { - "type": "Identifier", - "name": "thing", - "range": [ - 177, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 34 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "thing", - "range": [ - 177, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 34 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 149, - 158 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteShorthandAttribute", - "key": { - "type": "Identifier", - "name": "items", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "value": { - "type": "Identifier", - "name": "items", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "prop", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 11, - "column": 23 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "modifiers": [], - "range": [ - 167, - 175 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "expression": { - "type": "Identifier", - "name": "thing", - "range": [ - 177, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 34 - } - } - }, - "range": [ - 167, - 183 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 35 - } - } - } - ], - "selfClosing": false, - "range": [ - 148, - 184 - ], - "loc": { - "start": { - "line": 11, - "column": 0 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 184, - 186 - ], - "loc": { - "start": { - "line": 11, - "column": 36 - }, - "end": { - "line": 12, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 187, - 190 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 186, - 191 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "thing", - "range": [ - 192, - 197 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 198, - 202 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "range": [ - 192, - 202 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "range": [ - 191, - 203 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 18 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 203, - 209 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 186, - 209 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 209, - 210 - ], - "loc": { - "start": { - "line": 12, - "column": 24 - }, - "end": { - "line": 13, - "column": 0 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 210, - 222 - ], - "loc": { - "start": { - "line": 13, - "column": 0 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "range": [ - 148, - 222 - ], - "loc": { - "start": { - "line": 11, - "column": 0 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "thing", - "range": [ - 192, - 197 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thing", - "range": [ - 177, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 34 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "thing", - "range": [ - 192, - 197 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thing", - "range": [ - 177, - 182 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 34 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 149, - 158 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 149, - 158 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json index 39f734a8..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1185 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 196, - 201 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 185, - 194 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 57, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "fancy", - "range": [ - 67, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - ], - "range": [ - 60, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "selfClosing": false, - "range": [ - 56, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 74, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "slot", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "name", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 90, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "range": [ - 84, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - { - "type": "SvelteShorthandAttribute", - "key": { - "type": "Identifier", - "name": "item", - "range": [ - 97, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "value": { - "type": "Identifier", - "name": "item", - "range": [ - 97, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 96, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "selfClosing": false, - "range": [ - 78, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 3 - }, - "end": { - "line": 5, - "column": 28 - } - } - }, - "children": [], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 28 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - "range": [ - 78, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 3 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 110, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 35 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 113, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "range": [ - 56, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - } - ], - "else": null, - "range": [ - 32, - 127 - ], - "loc": { - "start": { - "line": 3, - "column": 1 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 97, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 97, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 48, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 206, - 209 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 210, - 214 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 216, - 220 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 16 - } - } - } - ], - "range": [ - 210, - 221 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 222, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "range": [ - 222, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 26 - } - } - } - ], - "selfClosing": false, - "range": [ - 205, - 231 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 27 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 28 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 33 - }, - "end": { - "line": 14, - "column": 37 - } - } - }, - "range": [ - 232, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 28 - }, - "end": { - "line": 14, - "column": 37 - } - } - }, - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 14, - "column": 27 - }, - "end": { - "line": 14, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 242, - 248 - ], - "loc": { - "start": { - "line": 14, - "column": 38 - }, - "end": { - "line": 14, - "column": 44 - } - } - }, - "range": [ - 205, - 248 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 44 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 28 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 28 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 196, - 201 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 185, - 194 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 39, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 196, - 201 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 185, - 194 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json index ae2e9cb0..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,479 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "init": null, - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 110, - 115 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 110, - 115 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 77, - 82 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 110, - 115 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json index 46ae567e..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 24, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 24, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 24, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json index d57aad1f..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 1, - "column": 57 - }, - "end": { - "line": 1, - "column": 60 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "currentSelection", - "range": [ - 24, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 1, - "column": 57 - }, - "end": { - "line": 1, - "column": 60 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "currentSelection", - "range": [ - 24, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 1, - "column": 57 - }, - "end": { - "line": 1, - "column": 60 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "currentSelection", - "range": [ - 24, - 40 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json index e4b9ebc5..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 22, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 22, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 22, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json index 709b59cf..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,484 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "tag", - "identifiers": [ - { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "'div'", - "value": "div", - "range": [ - 20, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 14, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 81, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - }, - { - "name": "handler", - "identifiers": [ - { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "init": null, - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 96, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 96, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handler", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 81, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json index 0939605a..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 1, - "column": 25 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json index 5d1a05b2..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json index 1a1a1e4f..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,889 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "handleKeydown", - "identifiers": [ - { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "range": [ - 65, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "pressed the ", - "raw": "pressed the " - }, - "range": [ - 50, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": " key", - "raw": " key" - }, - "range": [ - 74, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 50, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 44, - 81 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 39 - } - } - }, - "range": [ - 44, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 40, - 85 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 4, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "range": [ - 10, - 85 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 4, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 124, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 124, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "range": [ - 65, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "pressed the ", - "raw": "pressed the " - }, - "range": [ - 50, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": " key", - "raw": " key" - }, - "range": [ - 74, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 32 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 50, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 44, - 81 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 39 - } - } - }, - "range": [ - 44, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 40, - 85 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 4, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "range": [ - 10, - 85 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 4, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json index 73722a53..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 29 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json index cfb4d937..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 1, - "column": 27 - }, - "end": { - "line": 1, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json index 2b4f70cd..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleVisibilityChange", - "range": [ - 39, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "someAction", - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handleVisibilityChange", - "range": [ - 39, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "someAction", - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handleVisibilityChange", - "range": [ - 39, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "someAction", - "range": [ - 68, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json index 4847b237..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handler", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 23 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json index 2d99361b..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,157 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 29, - 45 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 63, - 79 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 29, - 45 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 63, - 79 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 29, - 45 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 63, - 79 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json index 5eb6b12b..b8e63d13 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -19,88 +18,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 1, - "column": 24 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json index d392ca4b..b8e63d13 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -19,16 +18,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json index ed632d37..521634fa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Widget", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json index 13e6a91d..521634fa 100644 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,618 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Foo", - "identifiers": [ - { - "type": "Identifier", - "name": "Foo", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Foo", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Foo", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Foo", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Foo", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Array", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "Array", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 57, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - "context": { - "type": "Identifier", - "name": "i", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Foo", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 81, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "i", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "range": [ - 86, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 89, - 95 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 81, - 95 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "else": null, - "range": [ - 50, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 6, - "column": 28 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Foo", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Foo", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Foo", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Foo", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Array", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Array", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json index 46e96fe8..521634fa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,280 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'world'", - "value": "world", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 14, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json index f9f3b516..521634fa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Nested", - "identifiers": [ - { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json index b4d0dab2..521634fa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,755 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 130, - 135 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 63, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "range": [ - 50, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [], - "range": [ - 27, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 98, - 109 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 98, - 109 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 130, - 135 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json index 67643eaa..521634fa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3246 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "quintOut", - "identifiers": [ - { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 835, - 843 - ], - "loc": { - "start": { - "line": 48, - "column": 53 - }, - "end": { - "line": 48, - "column": 61 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "fade", - "identifiers": [ - { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 46, - "column": 9 - }, - "end": { - "line": 46, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 1159, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 7 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ] - }, - { - "name": "draw", - "identifiers": [ - { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "local": { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "draw", - "range": [ - 945, - 949 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ] - }, - { - "name": "fly", - "identifiers": [ - { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "local": { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 1080, - 1083 - ], - "loc": { - "start": { - "line": 60, - "column": 27 - }, - "end": { - "line": 60, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - } - ] - }, - { - "name": "expand", - "identifiers": [ - { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "local": { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expand", - "range": [ - 789, - 795 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - }, - { - "name": "inner", - "identifiers": [ - { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "inner", - "range": [ - 1024, - 1029 - ], - "loc": { - "start": { - "line": 55, - "column": 7 - }, - "end": { - "line": 55, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "name": "outer", - "identifiers": [ - { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "local": { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "outer", - "range": [ - 916, - 921 - ], - "loc": { - "start": { - "line": 50, - "column": 7 - }, - "end": { - "line": 50, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 217, - 221 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 207, - 221 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 653, - 660 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 1296, - 1303 - ], - "loc": { - "start": { - "line": 70, - "column": 38 - }, - "end": { - "line": 70, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 653, - 660 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 1296, - 1303 - ], - "loc": { - "start": { - "line": 70, - "column": 38 - }, - "end": { - "line": 70, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 207, - 214 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 46, - "column": 9 - }, - "end": { - "line": 46, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 835, - 843 - ], - "loc": { - "start": { - "line": 48, - "column": 53 - }, - "end": { - "line": 48, - "column": 61 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expand", - "range": [ - 789, - 795 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "outer", - "range": [ - 916, - 921 - ], - "loc": { - "start": { - "line": 50, - "column": 7 - }, - "end": { - "line": 50, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "draw", - "range": [ - 945, - 949 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "inner", - "range": [ - 1024, - 1029 - ], - "loc": { - "start": { - "line": 55, - "column": 7 - }, - "end": { - "line": 55, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 1080, - 1083 - ], - "loc": { - "start": { - "line": 60, - "column": 27 - }, - "end": { - "line": 60, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "char", - "identifiers": [ - { - "type": "Identifier", - "name": "char", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 61, - "column": 21 - }, - "end": { - "line": 61, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "char", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 61, - "column": 21 - }, - "end": { - "line": 61, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Literal", - "raw": "'SVELTE'", - "value": "SVELTE", - "range": [ - 1122, - 1130 - ], - "loc": { - "start": { - "line": 61, - "column": 9 - }, - "end": { - "line": 61, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "char", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 61, - "column": 21 - }, - "end": { - "line": 61, - "column": 25 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 1140, - 1141 - ], - "loc": { - "start": { - "line": 61, - "column": 27 - }, - "end": { - "line": 61, - "column": 28 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 1147, - 1151 - ], - "loc": { - "start": { - "line": 62, - "column": 4 - }, - "end": { - "line": 62, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 1159, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 7 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "modifiers": [], - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 4 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "intro": true, - "outro": false, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 1167, - 1172 - ], - "loc": { - "start": { - "line": 63, - "column": 15 - }, - "end": { - "line": 63, - "column": 20 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 63, - "column": 22 - }, - "end": { - "line": 63, - "column": 26 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 1181, - 1182 - ], - "loc": { - "start": { - "line": 63, - "column": 29 - }, - "end": { - "line": 63, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "150", - "value": 150, - "range": [ - 1185, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 33 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - "range": [ - 1181, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 29 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - "range": [ - 1174, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 22 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - "range": [ - 1167, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 15 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 1190, - 1198 - ], - "loc": { - "start": { - "line": 63, - "column": 38 - }, - "end": { - "line": 63, - "column": 46 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "800", - "value": 800, - "range": [ - 1200, - 1203 - ], - "loc": { - "start": { - "line": 63, - "column": 48 - }, - "end": { - "line": 63, - "column": 51 - } - } - }, - "range": [ - 1190, - 1203 - ], - "loc": { - "start": { - "line": 63, - "column": 38 - }, - "end": { - "line": 63, - "column": 51 - } - } - } - ], - "range": [ - 1166, - 1204 - ], - "loc": { - "start": { - "line": 63, - "column": 14 - }, - "end": { - "line": 63, - "column": 52 - } - } - }, - "range": [ - 1156, - 1206 - ], - "loc": { - "start": { - "line": 63, - "column": 4 - }, - "end": { - "line": 63, - "column": 54 - } - } - } - ], - "selfClosing": false, - "range": [ - 1146, - 1211 - ], - "loc": { - "start": { - "line": 62, - "column": 3 - }, - "end": { - "line": 64, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "char", - "range": [ - 1212, - 1216 - ], - "loc": { - "start": { - "line": 64, - "column": 5 - }, - "end": { - "line": 64, - "column": 9 - } - } - }, - "range": [ - 1211, - 1217 - ], - "loc": { - "start": { - "line": 64, - "column": 4 - }, - "end": { - "line": 64, - "column": 10 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1217, - 1224 - ], - "loc": { - "start": { - "line": 64, - "column": 10 - }, - "end": { - "line": 64, - "column": 17 - } - } - }, - "range": [ - 1146, - 1224 - ], - "loc": { - "start": { - "line": 62, - "column": 3 - }, - "end": { - "line": 64, - "column": 17 - } - } - } - ], - "else": null, - "range": [ - 1115, - 1234 - ], - "loc": { - "start": { - "line": 61, - "column": 2 - }, - "end": { - "line": 65, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "char", - "range": [ - 1212, - 1216 - ], - "loc": { - "start": { - "line": 64, - "column": 5 - }, - "end": { - "line": 64, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "char", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 61, - "column": 21 - }, - "end": { - "line": 61, - "column": 25 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 1140, - 1141 - ], - "loc": { - "start": { - "line": 61, - "column": 27 - }, - "end": { - "line": 61, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 1140, - 1141 - ], - "loc": { - "start": { - "line": 61, - "column": 27 - }, - "end": { - "line": 61, - "column": 28 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Literal", - "raw": "'SVELTE'", - "value": "SVELTE", - "range": [ - 1122, - 1130 - ], - "loc": { - "start": { - "line": 61, - "column": 9 - }, - "end": { - "line": 61, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "char", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 61, - "column": 21 - }, - "end": { - "line": 61, - "column": 25 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 1140, - 1141 - ], - "loc": { - "start": { - "line": 61, - "column": 27 - }, - "end": { - "line": 61, - "column": 28 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 1147, - 1151 - ], - "loc": { - "start": { - "line": 62, - "column": 4 - }, - "end": { - "line": 62, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 1159, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 7 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "modifiers": [], - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 4 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "intro": true, - "outro": false, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 1167, - 1172 - ], - "loc": { - "start": { - "line": 63, - "column": 15 - }, - "end": { - "line": 63, - "column": 20 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 63, - "column": 22 - }, - "end": { - "line": 63, - "column": 26 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 1181, - 1182 - ], - "loc": { - "start": { - "line": 63, - "column": 29 - }, - "end": { - "line": 63, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "150", - "value": 150, - "range": [ - 1185, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 33 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - "range": [ - 1181, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 29 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - "range": [ - 1174, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 22 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - "range": [ - 1167, - 1188 - ], - "loc": { - "start": { - "line": 63, - "column": 15 - }, - "end": { - "line": 63, - "column": 36 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 1190, - 1198 - ], - "loc": { - "start": { - "line": 63, - "column": 38 - }, - "end": { - "line": 63, - "column": 46 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "800", - "value": 800, - "range": [ - 1200, - 1203 - ], - "loc": { - "start": { - "line": 63, - "column": 48 - }, - "end": { - "line": 63, - "column": 51 - } - } - }, - "range": [ - 1190, - 1203 - ], - "loc": { - "start": { - "line": 63, - "column": 38 - }, - "end": { - "line": 63, - "column": 51 - } - } - } - ], - "range": [ - 1166, - 1204 - ], - "loc": { - "start": { - "line": 63, - "column": 14 - }, - "end": { - "line": 63, - "column": 52 - } - } - }, - "range": [ - 1156, - 1206 - ], - "loc": { - "start": { - "line": 63, - "column": 4 - }, - "end": { - "line": 63, - "column": 54 - } - } - } - ], - "selfClosing": false, - "range": [ - 1146, - 1211 - ], - "loc": { - "start": { - "line": 62, - "column": 3 - }, - "end": { - "line": 64, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "char", - "range": [ - 1212, - 1216 - ], - "loc": { - "start": { - "line": 64, - "column": 5 - }, - "end": { - "line": 64, - "column": 9 - } - } - }, - "range": [ - 1211, - 1217 - ], - "loc": { - "start": { - "line": 64, - "column": 4 - }, - "end": { - "line": 64, - "column": 10 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1217, - 1224 - ], - "loc": { - "start": { - "line": 64, - "column": 10 - }, - "end": { - "line": 64, - "column": 17 - } - } - }, - "range": [ - 1146, - 1224 - ], - "loc": { - "start": { - "line": 62, - "column": 3 - }, - "end": { - "line": 64, - "column": 17 - } - } - } - ], - "else": null, - "range": [ - 1115, - 1234 - ], - "loc": { - "start": { - "line": 61, - "column": 2 - }, - "end": { - "line": 65, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 1181, - 1182 - ], - "loc": { - "start": { - "line": 63, - "column": 29 - }, - "end": { - "line": 63, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 1140, - 1141 - ], - "loc": { - "start": { - "line": 61, - "column": 27 - }, - "end": { - "line": 61, - "column": 28 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 1181, - 1182 - ], - "loc": { - "start": { - "line": 63, - "column": 29 - }, - "end": { - "line": 63, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 1140, - 1141 - ], - "loc": { - "start": { - "line": 61, - "column": 27 - }, - "end": { - "line": 61, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 1159, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 7 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "char", - "range": [ - 1212, - 1216 - ], - "loc": { - "start": { - "line": 64, - "column": 5 - }, - "end": { - "line": 64, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "char", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 61, - "column": 21 - }, - "end": { - "line": 61, - "column": 25 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 1159, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 7 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 46, - "column": 9 - }, - "end": { - "line": 46, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 835, - 843 - ], - "loc": { - "start": { - "line": 48, - "column": 53 - }, - "end": { - "line": 48, - "column": 61 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expand", - "range": [ - 789, - 795 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expand", - "range": [ - 116, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "outer", - "range": [ - 916, - 921 - ], - "loc": { - "start": { - "line": 50, - "column": 7 - }, - "end": { - "line": 50, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "outer", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "draw", - "range": [ - 945, - 949 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "draw", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "inner", - "range": [ - 1024, - 1029 - ], - "loc": { - "start": { - "line": 55, - "column": 7 - }, - "end": { - "line": 55, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "inner", - "range": [ - 167, - 172 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 1080, - 1083 - ], - "loc": { - "start": { - "line": 60, - "column": 27 - }, - "end": { - "line": 60, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 1159, - 1163 - ], - "loc": { - "start": { - "line": 63, - "column": 7 - }, - "end": { - "line": 63, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json index e03a07fa..521634fa 100644 --- a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,280 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 39, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 33 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 33 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json index f05ee87c..521634fa 100644 --- a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,200 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "_", - "identifiers": [ - { - "type": "Identifier", - "name": "_", - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "_", - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "_", - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "_", - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$_", - "range": [ - 103, - 105 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "_", - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$_", - "range": [ - 103, - 105 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "_", - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json b/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json index dc781fe1..b8e63d13 100644 --- a/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -19,179 +18,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 5, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 26, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 5, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 26, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 5, - 15 - ], - "loc": { - "start": { - "line": 1, - "column": 5 - }, - "end": { - "line": 1, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "expression", - "range": [ - 26, - 36 - ], - "loc": { - "start": { - "line": 1, - "column": 26 - }, - "end": { - "line": 1, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json index 5fe113cc..521634fa 100644 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,280 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 21, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 55, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 55, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json index 4663b307..b8e63d13 100644 --- a/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -19,280 +18,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 21, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 13, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 46, - 51 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 46, - 51 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json index 7b3b453f..521634fa 100644 --- a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3158 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "message", - "identifiers": [ - { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "init": null, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 242, - 249 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 300, - 307 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 33 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - } - ] - }, - { - "name": "formatMessage", - "identifiers": [ - { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": true, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "NewExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "message", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "resolve", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "optional": false, - "range": [ - 188, - 204 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "range": [ - 188, - 205 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "range": [ - 178, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "range": [ - 167, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Promise", - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "range": [ - 155, - 216 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "range": [ - 148, - 217 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 138, - 223 - ], - "loc": { - "start": { - "line": 3, - "column": 77 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - } - ], - "returnType": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 127, - 133 - ], - "loc": { - "start": { - "line": 3, - "column": 66 - }, - "end": { - "line": 3, - "column": 72 - } - } - } - ], - "range": [ - 126, - 134 - ], - "loc": { - "start": { - "line": 3, - "column": 65 - }, - "end": { - "line": 3, - "column": 73 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 65 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 73 - } - } - }, - "range": [ - 117, - 134 - ], - "loc": { - "start": { - "line": 3, - "column": 56 - }, - "end": { - "line": 3, - "column": 73 - } - } - }, - "range": [ - 94, - 223 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "range": [ - 78, - 223 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 7, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 286, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 242, - 249 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "message", - "identifiers": [ - { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": true, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "NewExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "message", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "resolve", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "optional": false, - "range": [ - 188, - 204 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "range": [ - 188, - 205 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "range": [ - 178, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "range": [ - 167, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Promise", - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "range": [ - 155, - 216 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "range": [ - 148, - 217 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 6, - "column": 11 - } - } - } - ], - "range": [ - 138, - 223 - ], - "loc": { - "start": { - "line": 3, - "column": 77 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - } - ], - "returnType": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 127, - 133 - ], - "loc": { - "start": { - "line": 3, - "column": 66 - }, - "end": { - "line": 3, - "column": 72 - } - } - } - ], - "range": [ - 126, - 134 - ], - "loc": { - "start": { - "line": 3, - "column": 65 - }, - "end": { - "line": 3, - "column": 73 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 65 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 73 - } - } - }, - "range": [ - 117, - 134 - ], - "loc": { - "start": { - "line": 3, - "column": 56 - }, - "end": { - "line": 3, - "column": 73 - } - } - }, - "range": [ - 94, - 223 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 7, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 65 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "resolve", - "identifiers": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "message", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "resolve", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "optional": false, - "range": [ - 188, - 204 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "range": [ - 188, - 205 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "range": [ - 178, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "range": [ - 167, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "resolve", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "resolve", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "resolve", - "range": [ - 167, - 174 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 196, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 49 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 47 - }, - "end": { - "line": 3, - "column": 55 - } - } - }, - "range": [ - 101, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 55 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 65 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 286, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 300, - 307 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 33 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "result", - "identifiers": [ - { - "type": "Identifier", - "name": "result", - "range": [ - 340, - 346 - ], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "result", - "range": [ - 340, - 346 - ], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "result", - "range": [ - 340, - 346 - ], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 347, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "result", - "range": [ - 357, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "range": [ - 356, - 364 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 16 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - ], - "range": [ - 333, - 369 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 17, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "result", - "range": [ - 357, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "result", - "range": [ - 340, - 346 - ], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "result", - "range": [ - 357, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "result", - "range": [ - 340, - 346 - ], - "loc": { - "start": { - "line": 15, - "column": 11 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 286, - 299 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatMessage", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "message", - "range": [ - 300, - 307 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 33 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "message", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - ], - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 41, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 40 - } - } - }, - "range": [ - 34, - 59 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 40 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 3, - "column": 58 - }, - "end": { - "line": 3, - "column": 65 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 159, - 166 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json index 0dd91cb4..521634fa 100644 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,476 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "f", - "range": [ - 7, - 8 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 17, - 18 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "k", - "identifiers": [ - { - "type": "Identifier", - "name": "k", - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "k", - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 17, - 18 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "f", - "range": [ - 7, - 8 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 7, - 19 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 3, - "column": 2 - } - } - }, - "context": { - "type": "Identifier", - "name": "k", - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Csdf", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 25, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "children": [], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 25, - 38 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "else": null, - "range": [ - 0, - 45 - ], - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 28 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Csdf", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Csdf", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "f", - "range": [ - 7, - 8 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 17, - 18 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Csdf", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "f", - "range": [ - 7, - 8 - ], - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 17, - 18 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 1 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Csdf", - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json index 7016569e..521634fa 100644 --- a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1835 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "init": { - "type": "Literal", - "raw": "null", - "value": null, - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 34 - }, - "end": { - "line": 2, - "column": 38 - } - } - }, - "range": [ - 32, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 129, - 132 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "name": "p", - "identifiers": [ - { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Promise", - "range": [ - 71, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "resolve", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 71, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "optional": false, - "range": [ - 71, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 67, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 109, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 71, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 109, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 67, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "v", - "identifiers": [ - { - "type": "Identifier", - "name": "v", - "range": [ - 119, - 120 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "v", - "range": [ - 119, - 120 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "v", - "range": [ - 119, - 120 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 121, - 124 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - { - "type": "SvelteIfBlock", - "elseif": false, - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 129, - 132 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "operator": "!=", - "right": { - "type": "Literal", - "raw": "null", - "value": null, - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "range": [ - 129, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "children": [], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [], - "range": [ - 144, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "range": [ - 124, - 159 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 11, - "column": 0 - } - } - } - ], - "range": [ - 112, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 0 - }, - "end": { - "line": 11, - "column": 0 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 129, - 132 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 129, - 132 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSStringKeyword", - "range": [ - 37, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 37, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 35, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 32, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 71, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 71, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json index 8583c557..521634fa 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,363 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "prerender", - "identifiers": [ - { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 40, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ] - }, - { - "name": "Counter", - "identifiers": [ - { - "type": "Identifier", - "name": "Counter", - "range": [ - 86, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Counter", - "range": [ - 86, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Counter", - "range": [ - 86, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "range": [ - 86, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Counter", - "range": [ - 492, - 499 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Counter", - "range": [ - 86, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "prerender", - "range": [ - 40, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Counter", - "range": [ - 492, - 499 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Counter", - "range": [ - 86, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json index b51dc638..521634fa 100644 --- a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1474 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 21, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 13, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 182, - 187 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 228, - 233 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 264, - 269 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "doubled", - "identifiers": [ - { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 45, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "range": [ - 37, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "range": [ - 27, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 247, - 254 - ], - "loc": { - "start": { - "line": 14, - "column": 23 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 90, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 90, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 116, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "range": [ - 107, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "range": [ - 107, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 104, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 23 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 90, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 20 - } - } - }, - "params": [], - "range": [ - 81, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 150, - 161 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 90, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "quadrupled", - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 150, - 161 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 90, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 174, - 179 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 182, - 187 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 228, - 233 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 247, - 254 - ], - "loc": { - "start": { - "line": 14, - "column": 23 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 27, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 3 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 264, - 269 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "quadrupled", - "range": [ - 286, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 26 - }, - "end": { - "line": 15, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 13, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "quadrupled", - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "quadrupled", - "range": [ - 286, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 26 - }, - "end": { - "line": 15, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "quadrupled", - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": false, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "quadrupled", - "range": [ - 286, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 26 - }, - "end": { - "line": 15, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json index 1f238128..521634fa 100644 --- a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2830 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "FancyList", - "identifiers": [ - { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 188, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "data", - "identifiers": [ - { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "foo", - "range": [ - 63, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "modifiers": [], - "range": [ - 59, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "expression": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 59, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "selfClosing": false, - "range": [ - 48, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 74, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 5, - "column": 1 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "data", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item3", - "range": [ - 124, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 41 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "modifiers": [], - "range": [ - 120, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "expression": { - "type": "Identifier", - "name": "bar", - "range": [ - 131, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 48 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "range": [ - 120, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 52 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 53 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 53 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 140, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 139, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 150, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 152, - 158 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 158 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 158, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 9, - "column": 1 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "range": [ - 160, - 166 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": " no-def\n", - "range": [ - 166, - 174 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 10, - "column": 0 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 174, - 186 - ], - "loc": { - "start": { - "line": 10, - "column": 0 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 48, - 186 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 10, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item3", - "range": [ - 124, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 41 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "modifiers": [], - "range": [ - 120, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "expression": { - "type": "Identifier", - "name": "bar", - "range": [ - 131, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 48 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "range": [ - 120, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 52 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 53 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 53 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 140, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 139, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 150, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 152, - 158 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 158 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - } - ] - }, - { - "name": "item2", - "identifiers": [ - { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item3", - "range": [ - 124, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 41 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "modifiers": [], - "range": [ - 120, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "expression": { - "type": "Identifier", - "name": "bar", - "range": [ - 131, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 48 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "range": [ - 120, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 52 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 53 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 53 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 140, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 139, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 150, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 152, - 158 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 158 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 131, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 48 - }, - "end": { - "line": 6, - "column": 51 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 131, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 48 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item3", - "range": [ - 124, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 41 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "modifiers": [], - "range": [ - 120, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "expression": { - "type": "Identifier", - "name": "bar", - "range": [ - 131, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 48 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - "range": [ - 120, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 52 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 53 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 53 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 140, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 139, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 150, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 152, - 158 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 158 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 140, - 144 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 188, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 188, - 192 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json index a23f0444..521634fa 100644 --- a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,691 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Hoverable", - "identifiers": [ - { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "active", - "identifiers": [ - { - "type": "Identifier", - "name": "active", - "range": [ - 96, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 37 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "active", - "range": [ - 96, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 37 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "hovering", - "range": [ - 80, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "modifiers": [], - "range": [ - 76, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "expression": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 92, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "active", - "range": [ - 96, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 37 - } - } - }, - "range": [ - 92, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 27 - }, - "end": { - "line": 5, - "column": 37 - } - } - } - ], - "range": [ - 91, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 26 - }, - "end": { - "line": 5, - "column": 38 - } - } - }, - "range": [ - 76, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 40 - } - } - } - ], - "selfClosing": false, - "range": [ - 65, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 106, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 41 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 109, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Class", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "active", - "range": [ - 119, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "modifiers": [], - "range": [ - 113, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "expression": { - "type": "Identifier", - "name": "active", - "range": [ - 119, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "shorthand": true, - "range": [ - 113, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "selfClosing": true, - "range": [ - 108, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 108, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 128, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 129, - 141 - ], - "loc": { - "start": { - "line": 7, - "column": 0 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 65, - 141 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 119, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "active", - "range": [ - 96, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 37 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 119, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "active", - "range": [ - 96, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 37 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json index af682329..521634fa 100644 --- a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2307 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "FancyList", - "identifiers": [ - { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "data", - "identifiers": [ - { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "FancyList", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "foo", - "range": [ - 63, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "modifiers": [], - "range": [ - 59, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "expression": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 59, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "selfClosing": false, - "range": [ - 48, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 74, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 5, - "column": 1 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "data", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 120, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 42 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item2", - "range": [ - 127, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "class", - "range": [ - 133, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 50 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 127, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 43 - }, - "end": { - "line": 6, - "column": 56 - } - } - } - ], - "range": [ - 120, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 56 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 140 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 57 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 140, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 57 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 144, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 144, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 143, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 154, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 156, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 162, - 163 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 9, - "column": 0 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 163, - 175 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "range": [ - 48, - 175 - ], - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "data", - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "data", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 120, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 42 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item2", - "range": [ - 127, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "class", - "range": [ - 133, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 50 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 127, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 43 - }, - "end": { - "line": 6, - "column": 56 - } - } - } - ], - "range": [ - 120, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 56 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 140 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 57 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 140, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 57 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 144, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 144, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 143, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 154, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 156, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 144, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - } - ] - }, - { - "name": "item2", - "identifiers": [ - { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "item", - "range": [ - 95, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "modifiers": [], - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "modifiers": [], - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 36 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 120, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 42 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item2", - "range": [ - 127, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "class", - "range": [ - 133, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 50 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 127, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 43 - }, - "end": { - "line": 6, - "column": 56 - } - } - } - ], - "range": [ - 120, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 56 - } - } - } - ], - "selfClosing": false, - "range": [ - 84, - 140 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 57 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 140, - 143 - ], - "loc": { - "start": { - "line": 6, - "column": 57 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 144, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 144, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 143, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 154, - 156 - ], - "loc": { - "start": { - "line": 7, - "column": 13 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 156, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "range": [ - 84, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 8, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item2", - "range": [ - 127, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item2", - "range": [ - 127, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 44 - }, - "end": { - "line": 6, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item2", - "range": [ - 114, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 36 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 144, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 105, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json index f00d5214..521634fa 100644 --- a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,797 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "collapsed", - "identifiers": [ - { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - "range": [ - 110, - 127 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 28 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "collapsed", - "range": [ - 110, - 119 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "something", - "identifiers": [ - { - "type": "Identifier", - "name": "something", - "range": [ - 202, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 35 - }, - "end": { - "line": 8, - "column": 44 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "something", - "range": [ - 202, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 35 - }, - "end": { - "line": 8, - "column": 44 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "special", - "name": { - "type": "SvelteName", - "name": "svelte:self", - "range": [ - 176, - 187 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "collapsed", - "range": [ - 188, - 197 - ], - "loc": { - "start": { - "line": 8, - "column": 21 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - "boolean": true, - "value": [], - "range": [ - 188, - 197 - ], - "loc": { - "start": { - "line": 8, - "column": 21 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "something", - "range": [ - 202, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 35 - }, - "end": { - "line": 8, - "column": 44 - } - } - }, - "modifiers": [], - "range": [ - 198, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 44 - } - } - }, - "expression": { - "type": "Identifier", - "name": "something", - "range": [ - 202, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 35 - }, - "end": { - "line": 8, - "column": 44 - } - } - }, - "range": [ - 198, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 44 - } - } - } - ], - "selfClosing": false, - "range": [ - 175, - 212 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 45 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 212, - 225 - ], - "loc": { - "start": { - "line": 8, - "column": 45 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "slot", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteShorthandAttribute", - "key": { - "type": "Identifier", - "name": "something", - "range": [ - 232, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "value": { - "type": "Identifier", - "name": "something", - "range": [ - 232, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 29 - } - } - } - ], - "selfClosing": true, - "range": [ - 225, - 245 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 225, - 245 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 245, - 254 - ], - "loc": { - "start": { - "line": 9, - "column": 32 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 254, - 268 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 175, - 268 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "something", - "range": [ - 232, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "something", - "range": [ - 202, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 35 - }, - "end": { - "line": 8, - "column": 44 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "something", - "range": [ - 232, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "something", - "range": [ - 202, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 35 - }, - "end": { - "line": 8, - "column": 44 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json index 2e095a62..521634fa 100644 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 1, - 4 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 1, - 4 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 1, - 4 - ], - "loc": { - "start": { - "line": 1, - "column": 1 - }, - "end": { - "line": 1, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json index a65ca982..521634fa 100644 --- a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,240 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "prop", - "identifiers": [ - { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": { - "type": "Literal", - "raw": "'foo'", - "value": "foo", - "range": [ - 28, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 21, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json index 0f4c42aa..521634fa 100644 --- a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,141 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "prop", - "identifiers": [ - { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": null, - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json index c6c13a11..521634fa 100644 --- a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,222 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "prop", - "identifiers": [ - { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": null, - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json index c6c13a11..521634fa 100644 --- a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,222 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "prop", - "identifiers": [ - { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": null, - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "prop", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "prop", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json index df1d684e..521634fa 100644 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,470 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "objs", - "identifiers": [ - { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 22, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - ], - "range": [ - 21, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 36, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 39, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 36, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "b", - "range": [ - 42, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 34 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 45, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 36 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 42, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 37 - } - } - } - ], - "range": [ - 35, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 38 - } - } - } - ], - "range": [ - 20, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - "range": [ - 13, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 39 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "objs", - "range": [ - 13, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json index 2da89d4d..521634fa 100644 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,88 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json index 3e973d09..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,618 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"foo\"", - "value": "foo", - "range": [ - 29, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "range": [ - 23, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - ], - "range": [ - 21, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 15, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "range": [ - 43, - 50 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "bar", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "range": [ - 43, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json index 545f3c68..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,734 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 23, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"foo\"", - "value": "foo", - "range": [ - 29, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "range": [ - 23, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 25 - } - } - } - ], - "range": [ - 21, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 15, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 51, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "range": [ - 45, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "range": [ - 45, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - ], - "range": [ - 43, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "bar", - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 43, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 45, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json index 67fc4df6..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,656 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "\"foo\"", - "value": "foo", - "range": [ - 23, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "range": [ - 21, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "range": [ - 15, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 45, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - ], - "range": [ - 37, - 49 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "bar", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 37, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json index 0b51f1a1..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,557 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "\"foo\"", - "value": "foo", - "range": [ - 23, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "range": [ - 21, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "range": [ - 15, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "RestElement", - "argument": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "range": [ - 38, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "range": [ - 37, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "bar", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "range": [ - 37, - 51 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 66, - 69 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 66, - 69 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json index b00da738..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,593 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "\"foo\"", - "value": "foo", - "range": [ - 23, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "range": [ - 21, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "range": [ - 15, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ArrayPattern", - "elements": [ - { - "type": "RestElement", - "argument": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "range": [ - 38, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "range": [ - 37, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "operator": "=", - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "SpreadElement", - "argument": { - "type": "Identifier", - "name": "bar", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 49, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "range": [ - 48, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 37, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 15, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 71, - 74 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 41, - 44 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json index e3ea65b7..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1059 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 66, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 17 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "optional": false, - "range": [ - 72, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 66, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 63, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - "range": [ - 57, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 6, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 103, - 106 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - ], - "range": [ - 93, - 100 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "bar", - "range": [ - 103, - 106 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "range": [ - 93, - 106 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 119, - 123 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ] - }, - { - "name": "baz", - "identifiers": [ - { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "$foo", - "range": [ - 119, - 123 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "range": [ - 113, - 123 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 137, - 140 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 103, - 106 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 119, - 123 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 137, - 140 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json index 491dcfd0..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,943 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 64, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 73, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 64, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 57, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 86, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "bar", - "range": [ - 86, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 80, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - } - ] - }, - { - "name": "baz", - "identifiers": [ - { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "$foo", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "range": [ - 95, - 105 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 64, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 18, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 86, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 57, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 6 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json index 70b27a67..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2352 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 170, - 176 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 170, - 176 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 192, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 192, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 213, - 219 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 213, - 219 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 268, - 274 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 268, - 274 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "count2", - "identifiers": [ - { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "local": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$count2", - "range": [ - 139, - 146 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count2", - "range": [ - 295, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count2", - "range": [ - 295, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ] - }, - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 123, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 110, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 164, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 319, - 322 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 123, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 123, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 117, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 185, - 189 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 340, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 340, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - } - ] - }, - { - "name": "baz", - "identifiers": [ - { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "$count", - "range": [ - 213, - 219 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "5", - "value": 5, - "range": [ - 222, - 223 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "range": [ - 213, - 223 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "range": [ - 207, - 223 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 361, - 364 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 123, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 65, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count2", - "range": [ - 139, - 146 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 164, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 170, - 176 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 185, - 189 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 192, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 213, - 219 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 268, - 274 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count2", - "range": [ - 295, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count2", - "range": [ - 26, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 319, - 322 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 340, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "baz", - "range": [ - 361, - 364 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "baz", - "range": [ - 207, - 210 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json index f1c8d085..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1458 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 66, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 60, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 107, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 11, - "column": 22 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 11, - "column": 22 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 91, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "range": [ - 85, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 114, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 167, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 167, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 246, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 22 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 246, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 22 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 107, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 114, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 145, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 167, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 11, - "column": 22 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$foo", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 11, - "column": 22 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 60, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 246, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 22 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$bar", - "range": [ - 246, - 250 - ], - "loc": { - "start": { - "line": 12, - "column": 22 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json index dd3a4ea2..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,312 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "init": null, - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 64, - 67 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 64, - 67 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json index 79d70897..521634fa 100644 --- a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,584 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "init": null, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 56, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 32, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 30, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json index 9a318f3b..521634fa 100644 --- a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,550 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$name", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$name", - "range": [ - 141, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$name", - "range": [ - 141, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "greeting", - "identifiers": [ - { - "type": "Identifier", - "name": "greeting", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "greeting", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "greeting", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "local": { - "type": "Identifier", - "name": "greeting", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$greeting", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "greeting", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$greeting", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "greeting", - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$name", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$name", - "range": [ - 141, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$name", - "range": [ - 141, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 8, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json index b2cadb59..521634fa 100644 --- a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,295 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 22, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 62, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "literal", - "range": [ - 147, - 154 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 22, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 62, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "literal", - "range": [ - 147, - 154 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 22, - 30 - ], - "loc": { - "start": { - "line": 1, - "column": 22 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 62, - 70 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "variable", - "range": [ - 101, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "literal", - "range": [ - 147, - 154 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json index 4e5ca43c..521634fa 100644 --- a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,280 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "color", - "identifiers": [ - { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "init": { - "type": "Literal", - "raw": "'red'", - "value": "red", - "range": [ - 27, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 19, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "color", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "color", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json index 8be3c32c..521634fa 100644 --- a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,526 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "containerStyles", - "identifiers": [ - { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 42, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 35 - } - } - }, - "range": [ - 24, - 44 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 84, - 99 - ], - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 54 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ] - }, - { - "name": "containerStylesHtml", - "identifiers": [ - { - "type": "Identifier", - "name": "containerStylesHtml", - "range": [ - 52, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "containerStylesHtml", - "range": [ - 52, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "containerStylesHtml", - "range": [ - 52, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "operator": "=", - "right": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 84, - 99 - ], - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 54 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 54 - }, - "end": { - "line": 3, - "column": 64 - } - } - } - ], - "range": [ - 74, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 64 - } - } - }, - "range": [ - 52, - 109 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 64 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "containerStylesHtml", - "range": [ - 52, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "containerStylesHtml", - "range": [ - 52, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 84, - 99 - ], - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 54 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "containerStyles", - "range": [ - 24, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json index 3cbffdf5..521634fa 100644 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,595 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "tag", - "identifiers": [ - { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "'div'", - "value": "div", - "range": [ - 22, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 16, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 89, - 92 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 41, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 53, - 54 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tag", - "range": [ - 89, - 92 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tag", - "range": [ - 16, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 41, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 41, - 48 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-$state01-input.svelte b/tests/fixtures/parser/ast/svelte5/ts-$state01-input.svelte similarity index 100% rename from tests/fixtures/parser/ast/ts-$state01-input.svelte rename to tests/fixtures/parser/ast/svelte5/ts-$state01-input.svelte diff --git a/tests/fixtures/parser/ast/ts-$state01-no-unused-vars-result.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-no-unused-vars-result.json similarity index 100% rename from tests/fixtures/parser/ast/ts-$state01-no-unused-vars-result.json rename to tests/fixtures/parser/ast/svelte5/ts-$state01-no-unused-vars-result.json diff --git a/tests/fixtures/parser/ast/ts-$state01-output.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-output.json similarity index 100% rename from tests/fixtures/parser/ast/ts-$state01-output.json rename to tests/fixtures/parser/ast/svelte5/ts-$state01-output.json diff --git a/tests/fixtures/parser/ast/ts-$state01-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-prefer-const-result.json similarity index 100% rename from tests/fixtures/parser/ast/ts-$state01-prefer-const-result.json rename to tests/fixtures/parser/ast/svelte5/ts-$state01-prefer-const-result.json diff --git a/tests/fixtures/parser/ast/ts-$state01-requirements.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-requirements.json similarity index 100% rename from tests/fixtures/parser/ast/ts-$state01-requirements.json rename to tests/fixtures/parser/ast/svelte5/ts-$state01-requirements.json diff --git a/tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json similarity index 81% rename from tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json rename to tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json index ad84f430..d6cb8fd8 100644 --- a/tests/fixtures/parser/ast/ts-$state01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json @@ -1,5 +1,6 @@ { "type": "global", + "references": [], "variables": [ { "name": "$$slots", @@ -27,48 +28,20 @@ { "identifier": { "type": "Identifier", - "name": "$state", - "range": [ - 33, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 20 - } - } + "name": "$state" }, "from": "module", - "init": null, - "resolved": null + "resolved": null, + "init": null }, { "identifier": { "type": "Identifier", - "name": "$state", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 19 - } - } + "name": "$state" }, "from": "module", - "init": null, - "resolved": null + "resolved": null, + "init": null } ] }, @@ -97,7 +70,6 @@ "references": [] } ], - "references": [], "childScopes": [ { "type": "module", @@ -108,10 +80,7 @@ { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -130,10 +99,7 @@ "name": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -150,10 +116,7 @@ "id": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -172,10 +135,7 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [ - 40, - 41 - ], + "range": [40, 41], "loc": { "start": { "line": 2, @@ -191,10 +151,7 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -207,10 +164,7 @@ } }, "optional": false, - "range": [ - 33, - 42 - ], + "range": [33, 42], "loc": { "start": { "line": 2, @@ -222,10 +176,7 @@ } } }, - "range": [ - 25, - 42 - ], + "range": [25, 42], "loc": { "start": { "line": 2, @@ -244,10 +195,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -264,10 +212,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -284,10 +229,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 103, - 108 - ], + "range": [103, 108], "loc": { "start": { "line": 6, @@ -304,10 +246,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -324,10 +263,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 125, - 130 - ], + "range": [125, 130], "loc": { "start": { "line": 7, @@ -344,10 +280,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -368,10 +301,7 @@ { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -390,10 +320,7 @@ "name": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -410,10 +337,7 @@ "id": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -431,10 +355,7 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -447,10 +368,7 @@ } }, "optional": false, - "range": [ - 57, - 65 - ], + "range": [57, 65], "loc": { "start": { "line": 3, @@ -462,10 +380,7 @@ } } }, - "range": [ - 50, - 65 - ], + "range": [50, 65], "loc": { "start": { "line": 3, @@ -484,10 +399,7 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -504,10 +416,7 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -528,10 +437,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -548,10 +454,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -568,10 +471,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -591,10 +491,7 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -611,10 +508,7 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -631,10 +525,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -654,10 +545,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 125, - 130 - ], + "range": [125, 130], "loc": { "start": { "line": 7, @@ -674,10 +562,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -700,10 +585,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 103, - 108 - ], + "range": [103, 108], "loc": { "start": { "line": 6, @@ -720,10 +602,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -743,10 +622,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 103, - 108 - ], + "range": [103, 108], "loc": { "start": { "line": 6, @@ -763,10 +639,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -787,10 +660,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -810,10 +680,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -833,4 +700,4 @@ } ], "through": [] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-$state01-type-output.svelte b/tests/fixtures/parser/ast/svelte5/ts-$state01-type-output.svelte similarity index 100% rename from tests/fixtures/parser/ast/ts-$state01-type-output.svelte rename to tests/fixtures/parser/ast/svelte5/ts-$state01-type-output.svelte diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json index 58e9ef88..521634fa 100644 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,279 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 26, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json index 74955551..521634fa 100644 --- a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1126 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "component", - "identifiers": [ - { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "component", - "range": [ - 175, - 184 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "style", - "identifiers": [ - { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'red'", - "value": "red", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 57, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 55, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "range": [ - 47, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 202, - 207 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - }, - { - "name": "componentValue", - "identifiers": [ - { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "init": null, - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 222, - 236 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "metaData", - "identifiers": [ - { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handleChange", - "identifiers": [ - { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 136, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "params": [], - "range": [ - 112, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 255, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 202, - 207 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 222, - 236 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 255, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "component", - "range": [ - 175, - 184 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json index 8c61b3c3..521634fa 100644 --- a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1126 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "component", - "identifiers": [ - { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "component", - "range": [ - 227, - 236 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "style", - "identifiers": [ - { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'red'", - "value": "red", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 57, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 55, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "range": [ - 47, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 184, - 189 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - }, - { - "name": "componentValue", - "identifiers": [ - { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "init": null, - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 204, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "metaData", - "identifiers": [ - { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handleChange", - "identifiers": [ - { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 136, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "params": [], - "range": [ - 112, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 255, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 184, - 189 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 204, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 255, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 275, - 283 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "component", - "range": [ - 227, - 236 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json index 1a36ee04..521634fa 100644 --- a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1126 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "component", - "identifiers": [ - { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "component", - "range": [ - 273, - 282 - ], - "loc": { - "start": { - "line": 14, - "column": 7 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "style", - "identifiers": [ - { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 57, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'red'", - "value": "red", - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 57, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 55, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "range": [ - 47, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 184, - 189 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - }, - { - "name": "componentValue", - "identifiers": [ - { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "init": null, - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 204, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "metaData", - "identifiers": [ - { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 108, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 97, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 257, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handleChange", - "identifiers": [ - { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 136, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "params": [], - "range": [ - 112, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 237, - 249 - ], - "loc": { - "start": { - "line": 12, - "column": 17 - }, - "end": { - "line": 12, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 184, - 189 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 47, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 204, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "componentValue", - "range": [ - 77, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 237, - 249 - ], - "loc": { - "start": { - "line": 12, - "column": 17 - }, - "end": { - "line": 12, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleChange", - "range": [ - 121, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "metaData", - "range": [ - 257, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "metaData", - "range": [ - 97, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "component", - "range": [ - 273, - 282 - ], - "loc": { - "start": { - "line": 14, - "column": 7 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "component", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json index 9f943f84..521634fa 100644 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,466 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 19, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 15, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 7, - "column": 33 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "init": { - "type": "Literal", - "raw": "/a/", - "regex": { - "flags": "", - "pattern": "a" - }, - "value": "/a/", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "range": [ - 28, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 7, - "column": 33 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 15, - 16 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 7 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json index 0aa036ec..2d53184a 100644 --- a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -97,110 +96,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 35, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 35, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json index f249603c..7ae51ad2 100644 --- a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,64 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json index f249603c..7ae51ad2 100644 --- a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,64 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json index f249603c..7ae51ad2 100644 --- a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,64 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json index f249603c..7ae51ad2 100644 --- a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -73,64 +72,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-$state01-scope-output.json b/tests/fixtures/parser/ast/ts-$state01-scope-output.json deleted file mode 100644 index 88771ee2..00000000 --- a/tests/fixtures/parser/ast/ts-$state01-scope-output.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "type": "global", - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 35, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 35, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$props", - "range": [ - 23, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 4 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$$restProps", - "range": [ - 35, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json index cd38315b..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1477 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "str", - "identifiers": [ - { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "TSAsExpression", - "expression": { - "type": "Literal", - "raw": "'abc'", - "value": "abc", - "range": [ - 32, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "const", - "range": [ - 41, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 41, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 32, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 26, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "str", - "range": [ - 133, - 136 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "str", - "range": [ - 189, - 192 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "const", - "range": [ - 41, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "str", - "range": [ - 133, - 136 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "str", - "range": [ - 189, - 192 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "str", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 83, - 85 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 88, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 103, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 110, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 26 - }, - "end": { - "line": 6, - "column": 30 - } - } - }, - "range": [ - 85, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 114, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - ], - "range": [ - 58, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 7, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 103, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 103, - 109 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "s", - "identifiers": [ - { - "type": "Identifier", - "name": "s", - "range": [ - 142, - 143 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "s", - "range": [ - 142, - 143 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "s", - "range": [ - 142, - 143 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 144, - 146 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 10, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 147, - 148 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 146, - 149 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The string is ", - "range": [ - 149, - 163 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "s", - "range": [ - 164, - 165 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "range": [ - 163, - 166 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 21 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 166, - 170 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "range": [ - 146, - 170 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 10, - "column": 25 - }, - "end": { - "line": 11, - "column": 0 - } - } - } - ], - "range": [ - 125, - 171 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 11, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 164, - 165 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 142, - 143 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 164, - 165 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 142, - 143 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 18 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "s", - "identifiers": [ - { - "type": "Identifier", - "name": "s", - "range": [ - 207, - 208 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "s", - "range": [ - 207, - 208 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "s", - "range": [ - 207, - 208 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 209, - 211 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 14, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 212, - 213 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 211, - 214 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The string is ", - "range": [ - 214, - 228 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "s", - "range": [ - 229, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "range": [ - 228, - 231 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 231, - 235 - ], - "loc": { - "start": { - "line": 14, - "column": 21 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "range": [ - 211, - 235 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 235, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 15, - "column": 0 - } - } - } - ], - "range": [ - 181, - 236 - ], - "loc": { - "start": { - "line": 13, - "column": 0 - }, - "end": { - "line": 15, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 229, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 207, - 208 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 229, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 207, - 208 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "const", - "range": [ - 41, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json index ffdd10d8..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3789 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "list", - "identifiers": [ - { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [], - "range": [ - 46, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "range": [ - 29, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 115, - 119 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - } - ] - }, - { - "name": "items", - "identifiers": [ - { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [], - "range": [ - 95, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 48 - } - } - }, - "range": [ - 59, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 48 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "list", - "range": [ - 115, - 119 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "list", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSNumberKeyword", - "range": [ - 35, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 35, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 33, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - "range": [ - 29, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 70, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 28 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 83, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 82, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 33 - }, - "end": { - "line": 3, - "column": 40 - } - } - }, - "range": [ - 78, - 89 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 40 - } - } - } - ], - "range": [ - 66, - 90 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 41 - } - } - }, - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 64, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 59, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "list", - "range": [ - 115, - 119 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "e", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "e", - "range": [ - 131, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "range": [ - 130, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 7 - } - } - } - ], - "else": null, - "range": [ - 108, - 141 - ], - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 7, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 131, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 131, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 123, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 176, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 34 - }, - "end": { - "line": 8, - "column": 36 - } - } - }, - "range": [ - 171, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 36 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "index", - "range": [ - 186, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "range": [ - 185, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 193, - 197 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 198, - 202 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 193, - 202 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 192, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 22 - } - } - } - ], - "else": null, - "range": [ - 142, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 0 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 193, - 197 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - } - ] - }, - { - "name": "index", - "identifiers": [ - { - "type": "Identifier", - "name": "index", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "index", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "items", - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "index": { - "type": "Identifier", - "name": "index", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 176, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 34 - }, - "end": { - "line": 8, - "column": 36 - } - } - }, - "range": [ - 171, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 36 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "index", - "range": [ - 186, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "range": [ - 185, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 193, - 197 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 198, - 202 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 193, - 202 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "range": [ - 192, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 22 - } - } - } - ], - "else": null, - "range": [ - 142, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 0 - }, - "end": { - "line": 10, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "index", - "range": [ - 186, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "index", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 171, - 175 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "index", - "range": [ - 186, - 191 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "index", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 193, - 197 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json index fc8478f2..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,410 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Component", - "identifiers": [ - { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 106, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 90, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "range": [ - 87, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 130, - 132 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 127, - 128 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "range": [ - 127, - 132 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json index 0cf44528..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,410 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Component", - "identifiers": [ - { - "type": "Identifier", - "name": "Component", - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Component", - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 114, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 114, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 38, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 98, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "range": [ - 95, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 138, - 140 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "range": [ - 135, - 140 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json index 656a23db..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1197 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "createEventDispatcher", - "identifiers": [ - { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "local": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 85, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - } - ] - }, - { - "name": "emit", - "identifiers": [ - { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 85, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "optional": false, - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 122, - 128 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "range": [ - 120, - 128 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "range": [ - 117, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 143, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 138, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "range": [ - 107, - 155 - ], - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 6, - "column": 5 - } - } - } - ], - "range": [ - 106, - 156 - ], - "loc": { - "start": { - "line": 3, - "column": 38 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "range": [ - 85, - 158 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "range": [ - 78, - 158 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emit", - "range": [ - 163, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 85, - 106 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 31, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emit", - "range": [ - 163, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emit", - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 208, - 209 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 208, - 209 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 217, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "currentTarget", - "range": [ - 219, - 232 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "range": [ - 217, - 232 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "range": [ - 217, - 233 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 20 - } - } - } - ], - "range": [ - 211, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 12, - "column": 1 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 208, - 209 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - } - ], - "range": [ - 208, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 12, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 217, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 208, - 209 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 217, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 208, - 209 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 266, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 266, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 275, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "currentTarget", - "range": [ - 277, - 290 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 275, - 290 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "range": [ - 275, - 291 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 20 - } - } - } - ], - "range": [ - 269, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 15, - "column": 1 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 266, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - ], - "range": [ - 266, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 15, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 275, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 266, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 275, - 276 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 266, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json index 19c26dc8..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,286 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 51, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 51, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "currentTarget", - "range": [ - 62, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 6 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 60, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 60, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 20 - } - } - } - ], - "range": [ - 54, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 6, - "column": 1 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 51, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "range": [ - 51, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 6, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 51, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 51, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json index 4e4255e2..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,451 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Component", - "identifiers": [ - { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 86, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 86, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 349, - 355 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 347, - 355 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 347, - 356 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - ], - "range": [ - 108, - 358 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 11, - "column": 1 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "range": [ - 105, - 358 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 11, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json index 466cfcc8..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,451 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Component", - "identifiers": [ - { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 86, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 86, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 140, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 140, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "range": [ - 108, - 151 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "range": [ - 105, - 151 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 8, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 105, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json index f686e158..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4929 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "EventInfo", - "identifiers": [ - { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 24, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Type", - "name": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 24, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 24, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "start_at", - "range": [ - 42, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "range": [ - 42, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "range": [ - 36, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 4, - "column": 1 - } - } - }, - "range": [ - 19, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 24, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "info", - "identifiers": [ - { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "init": { - "type": "Literal", - "raw": "null", - "value": null, - "range": [ - 91, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 33 - } - } - }, - "range": [ - 66, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 248, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 11, - "column": 45 - }, - "end": { - "line": 11, - "column": 49 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 323, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 12, - "column": 52 - }, - "end": { - "line": 12, - "column": 56 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ] - }, - { - "name": "lightFormat", - "identifiers": [ - { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "i", - "range": [ - 139, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toString", - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 44 - }, - "end": { - "line": 7, - "column": 52 - } - } - }, - "range": [ - 139, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 52 - } - } - }, - "optional": false, - "range": [ - 139, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 54 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "i", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "TSNumberKeyword", - "range": [ - 128, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 121, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 118, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 117, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 54 - } - } - }, - "range": [ - 103, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 265, - 276 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 340, - 351 - ], - "loc": { - "start": { - "line": 12, - "column": 40 - }, - "end": { - "line": 12, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ] - }, - { - "name": "startDate", - "identifiers": [ - { - "type": "Identifier", - "name": "startDate", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "startDate", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "startDate", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "operator": "=", - "right": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "null", - "value": null, - "range": [ - 294, - 298 - ], - "loc": { - "start": { - "line": 11, - "column": 62 - }, - "end": { - "line": 11, - "column": 66 - } - } - }, - "consequent": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "info", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 11, - "column": 45 - }, - "end": { - "line": 11, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "start_at", - "range": [ - 282, - 290 - ], - "loc": { - "start": { - "line": 11, - "column": 50 - }, - "end": { - "line": 11, - "column": 58 - } - } - }, - "range": [ - 277, - 290 - ], - "loc": { - "start": { - "line": 11, - "column": 45 - }, - "end": { - "line": 11, - "column": 58 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 265, - 276 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 44 - } - } - }, - "optional": false, - "range": [ - 265, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 59 - } - } - }, - "test": { - "type": "ChainExpression", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "info", - "range": [ - 248, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 20 - } - } - }, - "optional": true, - "property": { - "type": "Identifier", - "name": "start_at", - "range": [ - 254, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 22 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 248, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 248, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 248, - 298 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 66 - } - } - }, - "range": [ - 235, - 299 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 67 - } - } - } - } - ], - "references": [] - }, - { - "name": "endDate", - "identifiers": [ - { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "null", - "value": null, - "range": [ - 369, - 373 - ], - "loc": { - "start": { - "line": 12, - "column": 69 - }, - "end": { - "line": 12, - "column": 73 - } - } - }, - "consequent": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "info", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 12, - "column": 52 - }, - "end": { - "line": 12, - "column": 56 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "start_at", - "range": [ - 357, - 365 - ], - "loc": { - "start": { - "line": 12, - "column": 57 - }, - "end": { - "line": 12, - "column": 65 - } - } - }, - "range": [ - 352, - 365 - ], - "loc": { - "start": { - "line": 12, - "column": 52 - }, - "end": { - "line": 12, - "column": 65 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 340, - 351 - ], - "loc": { - "start": { - "line": 12, - "column": 40 - }, - "end": { - "line": 12, - "column": 51 - } - } - }, - "optional": false, - "range": [ - 340, - 366 - ], - "loc": { - "start": { - "line": 12, - "column": 40 - }, - "end": { - "line": 12, - "column": 66 - } - } - }, - "test": { - "type": "ChainExpression", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "info", - "range": [ - 323, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "optional": true, - "property": { - "type": "Identifier", - "name": "start_at", - "range": [ - 329, - 337 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 37 - } - } - }, - "range": [ - 323, - 337 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 37 - } - } - }, - "range": [ - 323, - 337 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 37 - } - } - }, - "range": [ - 323, - 373 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 316, - 374 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 74 - } - } - }, - "range": [ - 306, - 374 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 74 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 24, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 153, - 158 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 9, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 216, - 223 - ], - "loc": { - "start": { - "line": 9, - "column": 63 - }, - "end": { - "line": 9, - "column": 70 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "startDate", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "startDate", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 248, - 252 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 265, - 276 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 11, - "column": 45 - }, - "end": { - "line": 11, - "column": 49 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "endDate", - "range": [ - 306, - 313 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "TSNumberKeyword", - "range": [ - 128, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 121, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 118, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "TSNumberKeyword", - "range": [ - 128, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 121, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 118, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "i", - "range": [ - 139, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toString", - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 44 - }, - "end": { - "line": 7, - "column": 52 - } - } - }, - "range": [ - 139, - 149 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 52 - } - } - }, - "optional": false, - "range": [ - 139, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 54 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "i", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "TSNumberKeyword", - "range": [ - 128, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 121, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 118, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 117, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 139, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "TSNumberKeyword", - "range": [ - 128, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 121, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 118, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 139, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 42 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "TSNumberKeyword", - "range": [ - 128, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - ], - "range": [ - 121, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 119, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 118, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 323, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 340, - 351 - ], - "loc": { - "start": { - "line": 12, - "column": 40 - }, - "end": { - "line": 12, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 12, - "column": 52 - }, - "end": { - "line": 12, - "column": 56 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 323, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 23 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 340, - 351 - ], - "loc": { - "start": { - "line": 12, - "column": 40 - }, - "end": { - "line": 12, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lightFormat", - "range": [ - 103, - 114 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "info", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 12, - "column": 52 - }, - "end": { - "line": 12, - "column": 56 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "info", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "EventInfo", - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 72, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 84, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 70, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 66, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Date", - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 153, - 158 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 9, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 216, - 223 - ], - "loc": { - "start": { - "line": 9, - "column": 63 - }, - "end": { - "line": 9, - "column": 70 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 153, - 158 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 9, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 216, - 223 - ], - "loc": { - "start": { - "line": 9, - "column": 63 - }, - "end": { - "line": 9, - "column": 70 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json index 68db634a..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3421 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Component", - "identifiers": [ - { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 391, - 400 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 477, - 486 - ], - "loc": { - "start": { - "line": 26, - "column": 3 - }, - "end": { - "line": 26, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "ListItem", - "identifiers": [ - { - "type": "Identifier", - "name": "ListItem", - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "local": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ] - }, - { - "name": "items", - "identifiers": [ - { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "title", - "range": [ - 126, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"Svelte.dev\"", - "value": "Svelte.dev", - "range": [ - 133, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 126, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "link", - "range": [ - 153, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"https://svelte.dev\"", - "value": "https://svelte.dev", - "range": [ - 159, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 32 - } - } - }, - "range": [ - 153, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 32 - } - } - } - ], - "range": [ - 118, - 186 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "title", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"TypeScript ESLint\"", - "value": "TypeScript ESLint", - "range": [ - 207, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 10, - "column": 32 - } - } - }, - "range": [ - 200, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 32 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "link", - "range": [ - 234, - 238 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"https://typescript-eslint.io\"", - "value": "https://typescript-eslint.io", - "range": [ - 240, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 42 - } - } - }, - "range": [ - 234, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 42 - } - } - } - ], - "range": [ - 192, - 277 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "title", - "range": [ - 291, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"TypeScript\"", - "value": "TypeScript", - "range": [ - 298, - 310 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "range": [ - 291, - 310 - ], - "loc": { - "start": { - "line": 14, - "column": 6 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "link", - "range": [ - 318, - 322 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"https://www.typescriptlang.org\"", - "value": "https://www.typescriptlang.org", - "range": [ - 324, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "range": [ - 318, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 44 - } - } - } - ], - "range": [ - 283, - 363 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 16, - "column": 5 - } - } - } - ], - "range": [ - 112, - 368 - ], - "loc": { - "start": { - "line": 4, - "column": 28 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "range": [ - 92, - 368 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 17, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 488, - 493 - ], - "loc": { - "start": { - "line": 26, - "column": 14 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 391, - 400 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 488, - 493 - ], - "loc": { - "start": { - "line": 26, - "column": 14 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Component", - "range": [ - 477, - 486 - ], - "loc": { - "start": { - "line": 26, - "column": 3 - }, - "end": { - "line": 26, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Component", - "range": [ - 28, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 413, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 25 - }, - "end": { - "line": 21, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 413, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 25 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Component", - "range": [ - 391, - 400 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 12 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteShorthandAttribute", - "key": { - "type": "Identifier", - "name": "items", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "value": { - "type": "Identifier", - "name": "items", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "range": [ - 401, - 408 - ], - "loc": { - "start": { - "line": 21, - "column": 13 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 413, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 25 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "modifiers": [], - "range": [ - 409, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 413, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 25 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "range": [ - 409, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 29 - } - } - } - ], - "selfClosing": false, - "range": [ - 390, - 418 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 30 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 418, - 423 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 424, - 427 - ], - "loc": { - "start": { - "line": 22, - "column": 5 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 423, - 428 - ], - "loc": { - "start": { - "line": 22, - "column": 4 - }, - "end": { - "line": 22, - "column": 9 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 428, - 435 - ], - "loc": { - "start": { - "line": 22, - "column": 9 - }, - "end": { - "line": 23, - "column": 6 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 436, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "title", - "range": [ - 441, - 446 - ], - "loc": { - "start": { - "line": 23, - "column": 12 - }, - "end": { - "line": 23, - "column": 17 - } - } - }, - "range": [ - 436, - 446 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 17 - } - } - }, - "range": [ - 435, - 447 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 18 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 447, - 452 - ], - "loc": { - "start": { - "line": 23, - "column": 18 - }, - "end": { - "line": 24, - "column": 4 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 452, - 458 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 10 - } - } - }, - "range": [ - 423, - 458 - ], - "loc": { - "start": { - "line": 22, - "column": 4 - }, - "end": { - "line": 24, - "column": 10 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 458, - 461 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 25, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 461, - 473 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 14 - } - } - }, - "range": [ - 390, - 473 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 25, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 436, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 413, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 25 - }, - "end": { - "line": 21, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 436, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 7 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 413, - 417 - ], - "loc": { - "start": { - "line": 21, - "column": 25 - }, - "end": { - "line": 21, - "column": 29 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSArrayType", - "elementType": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "ListItem", - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 97, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 92, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 509, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 13 - }, - "end": { - "line": 27, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 509, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 13 - }, - "end": { - "line": 27, - "column": 17 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 501, - 504 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "item", - "range": [ - 509, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 13 - }, - "end": { - "line": 27, - "column": 17 - } - } - }, - "modifiers": [], - "range": [ - 505, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 9 - }, - "end": { - "line": 27, - "column": 17 - } - } - }, - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 509, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 13 - }, - "end": { - "line": 27, - "column": 17 - } - } - }, - "range": [ - 505, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 9 - }, - "end": { - "line": 27, - "column": 17 - } - } - } - ], - "selfClosing": false, - "range": [ - 500, - 514 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 514, - 521 - ], - "loc": { - "start": { - "line": 27, - "column": 18 - }, - "end": { - "line": 28, - "column": 6 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "item", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "title", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 28, - "column": 12 - }, - "end": { - "line": 28, - "column": 17 - } - } - }, - "range": [ - 522, - 532 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 17 - } - } - }, - "range": [ - 521, - 533 - ], - "loc": { - "start": { - "line": 28, - "column": 6 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 533, - 538 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 29, - "column": 4 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 538, - 544 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 10 - } - } - }, - "range": [ - 500, - 544 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 29, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 509, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 13 - }, - "end": { - "line": 27, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 509, - 513 - ], - "loc": { - "start": { - "line": 27, - "column": 13 - }, - "end": { - "line": 27, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 579, - 582 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 37 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 579, - 582 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 37 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 550, - 554 - ], - "loc": { - "start": { - "line": 30, - "column": 5 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "slot", - "range": [ - 555, - 559 - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 30, - "column": 14 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "count", - "range": [ - 561, - 566 - ], - "loc": { - "start": { - "line": 30, - "column": 16 - }, - "end": { - "line": 30, - "column": 21 - } - } - } - ], - "range": [ - 555, - 567 - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "count", - "range": [ - 572, - 577 - ], - "loc": { - "start": { - "line": 30, - "column": 27 - }, - "end": { - "line": 30, - "column": 32 - } - } - }, - "modifiers": [], - "range": [ - 568, - 577 - ], - "loc": { - "start": { - "line": 30, - "column": 23 - }, - "end": { - "line": 30, - "column": 32 - } - } - }, - "expression": { - "type": "Identifier", - "name": "foo", - "range": [ - 579, - 582 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 37 - } - } - }, - "range": [ - 568, - 583 - ], - "loc": { - "start": { - "line": 30, - "column": 23 - }, - "end": { - "line": 30, - "column": 38 - } - } - } - ], - "selfClosing": false, - "range": [ - 549, - 584 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 39 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 584, - 591 - ], - "loc": { - "start": { - "line": 30, - "column": 39 - }, - "end": { - "line": 31, - "column": 6 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "foo", - "range": [ - 592, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 7 - }, - "end": { - "line": 31, - "column": 10 - } - } - }, - "range": [ - 591, - 596 - ], - "loc": { - "start": { - "line": 31, - "column": 6 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - { - "type": "SvelteText", - "value": "\n ", - "range": [ - 596, - 601 - ], - "loc": { - "start": { - "line": 31, - "column": 11 - }, - "end": { - "line": 32, - "column": 4 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 601, - 608 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 11 - } - } - }, - "range": [ - 549, - 608 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 32, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 592, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 7 - }, - "end": { - "line": 31, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 579, - 582 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 37 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 592, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 7 - }, - "end": { - "line": 31, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 579, - 582 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 37 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json index a09008a9..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1133 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "aWithNewline", - "identifiers": [ - { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 39, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 4 - } - } - }, - "range": [ - 22, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 3, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 154, - 166 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "bWithNewline", - "identifiers": [ - { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 63, - 65 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "range": [ - 46, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 5, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 168, - 180 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - }, - { - "name": "cWithNewline", - "identifiers": [ - { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 87, - 89 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 5 - } - } - }, - "range": [ - 69, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 182, - 194 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ] - }, - { - "name": "dWithNewline", - "identifiers": [ - { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 113, - 115 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 4 - } - } - }, - "range": [ - 95, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 9, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 196, - 208 - ], - "loc": { - "start": { - "line": 14, - "column": 43 - }, - "end": { - "line": 14, - "column": 55 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - } - ] - }, - { - "name": "eWithNewline", - "identifiers": [ - { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 138, - 140 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "range": [ - 120, - 141 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 210, - 222 - ], - "loc": { - "start": { - "line": 14, - "column": 57 - }, - "end": { - "line": 14, - "column": 69 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 154, - 166 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "aWithNewline", - "range": [ - 22, - 34 - ], - "loc": { - "start": { - "line": 2, - "column": 3 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 168, - 180 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bWithNewline", - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 182, - 194 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cWithNewline", - "range": [ - 69, - 81 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 196, - 208 - ], - "loc": { - "start": { - "line": 14, - "column": 43 - }, - "end": { - "line": 14, - "column": 55 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dWithNewline", - "range": [ - 95, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 210, - 222 - ], - "loc": { - "start": { - "line": 14, - "column": 57 - }, - "end": { - "line": 14, - "column": 69 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eWithNewline", - "range": [ - 120, - 132 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json index ca2b2075..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1798 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "num", - "identifiers": [ - { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 31, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 25, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 79, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "obj", - "identifiers": [ - { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [], - "range": [ - 63, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "range": [ - 40, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "obj", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "obj", - "range": [ - 94, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "obj", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 3 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 79, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 6 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "obj", - "range": [ - 94, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "obj", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 46, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": true, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 24 - } - } - }, - "range": [ - 46, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "range": [ - 44, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 43, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 40, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 6 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json index 7ddf379e..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3103 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "promise", - "identifiers": [ - { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 2, - "column": 67 - }, - "end": { - "line": 2, - "column": 68 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 88, - 90 - ], - "loc": { - "start": { - "line": 2, - "column": 69 - }, - "end": { - "line": 2, - "column": 71 - } - } - }, - "range": [ - 86, - 90 - ], - "loc": { - "start": { - "line": 2, - "column": 67 - }, - "end": { - "line": 2, - "column": 71 - } - } - } - ], - "range": [ - 85, - 91 - ], - "loc": { - "start": { - "line": 2, - "column": 66 - }, - "end": { - "line": 2, - "column": 72 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "resolve", - "range": [ - 77, - 84 - ], - "loc": { - "start": { - "line": 2, - "column": 58 - }, - "end": { - "line": 2, - "column": 65 - } - } - }, - "optional": false, - "range": [ - 77, - 92 - ], - "loc": { - "start": { - "line": 2, - "column": 58 - }, - "end": { - "line": 2, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 48 - }, - "end": { - "line": 2, - "column": 55 - } - } - } - ], - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 2, - "column": 47 - }, - "end": { - "line": 2, - "column": 73 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Promise", - "range": [ - 58, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 54, - 93 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 74 - } - } - }, - "range": [ - 24, - 93 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 74 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 114, - 121 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 58, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 114, - 121 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "range": [ - 40, - 50 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "range": [ - 39, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 31, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 24, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "resolve", - "identifiers": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 48 - }, - "end": { - "line": 2, - "column": 55 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "resolve", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 48 - }, - "end": { - "line": 2, - "column": 55 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "a", - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 2, - "column": 67 - }, - "end": { - "line": 2, - "column": 68 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 88, - 90 - ], - "loc": { - "start": { - "line": 2, - "column": 69 - }, - "end": { - "line": 2, - "column": 71 - } - } - }, - "range": [ - 86, - 90 - ], - "loc": { - "start": { - "line": 2, - "column": 67 - }, - "end": { - "line": 2, - "column": 71 - } - } - } - ], - "range": [ - 85, - 91 - ], - "loc": { - "start": { - "line": 2, - "column": 66 - }, - "end": { - "line": 2, - "column": 72 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "resolve", - "range": [ - 77, - 84 - ], - "loc": { - "start": { - "line": 2, - "column": 58 - }, - "end": { - "line": 2, - "column": 65 - } - } - }, - "optional": false, - "range": [ - 77, - 92 - ], - "loc": { - "start": { - "line": 2, - "column": 58 - }, - "end": { - "line": 2, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "resolve", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 48 - }, - "end": { - "line": 2, - "column": 55 - } - } - } - ], - "range": [ - 66, - 92 - ], - "loc": { - "start": { - "line": 2, - "column": 47 - }, - "end": { - "line": 2, - "column": 73 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "resolve", - "range": [ - 77, - 84 - ], - "loc": { - "start": { - "line": 2, - "column": 58 - }, - "end": { - "line": 2, - "column": 65 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "resolve", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 48 - }, - "end": { - "line": 2, - "column": 55 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "resolve", - "range": [ - 77, - 84 - ], - "loc": { - "start": { - "line": 2, - "column": 58 - }, - "end": { - "line": 2, - "column": 65 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "resolve", - "range": [ - 67, - 74 - ], - "loc": { - "start": { - "line": 2, - "column": 48 - }, - "end": { - "line": 2, - "column": 55 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 156, - 158 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 8, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 161, - 175 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "number", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "a", - "range": [ - 183, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 26 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "range": [ - 176, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "range": [ - 175, - 185 - ], - "loc": { - "start": { - "line": 8, - "column": 18 - }, - "end": { - "line": 8, - "column": 28 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 185, - 189 - ], - "loc": { - "start": { - "line": 8, - "column": 28 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - "range": [ - 158, - 189 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 8, - "column": 32 - }, - "end": { - "line": 9, - "column": 0 - } - } - } - ], - "range": [ - 142, - 190 - ], - "loc": { - "start": { - "line": 7, - "column": 0 - }, - "end": { - "line": 9, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 149, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 198, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 198, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 198, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 204, - 206 - ], - "loc": { - "start": { - "line": 9, - "column": 14 - }, - "end": { - "line": 10, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 207, - 208 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 209, - 214 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 216, - 226 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 21 - } - } - } - ], - "range": [ - 209, - 227 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 206, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 24 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 30 - }, - "end": { - "line": 10, - "column": 37 - } - } - }, - "range": [ - 229, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 24 - }, - "end": { - "line": 10, - "column": 37 - } - } - }, - "range": [ - 228, - 243 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 38 - }, - "end": { - "line": 10, - "column": 42 - } - } - }, - "range": [ - 206, - 247 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 247, - 248 - ], - "loc": { - "start": { - "line": 10, - "column": 42 - }, - "end": { - "line": 11, - "column": 0 - } - } - } - ], - "range": [ - 190, - 248 - ], - "loc": { - "start": { - "line": 9, - "column": 0 - }, - "end": { - "line": 11, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 24 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 198, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 24 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 198, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 58, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 58, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json index 0417e4a8..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,6686 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 38, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 200, - 207 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 503, - 510 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 658, - 665 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 819, - 826 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 980, - 987 - ], - "loc": { - "start": { - "line": 51, - "column": 8 - }, - "end": { - "line": 51, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 1141, - 1148 - ], - "loc": { - "start": { - "line": 59, - "column": 8 - }, - "end": { - "line": 59, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 84, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 84, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 84, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 91, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 7, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 94, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 93, - 96 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 96, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 111, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 110, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 93, - 122 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 122, - 123 - ], - "loc": { - "start": { - "line": 7, - "column": 30 - }, - "end": { - "line": 8, - "column": 0 - } - } - } - ], - "range": [ - 77, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 8, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 111, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 84, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 111, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 84, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 131, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 131, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 131, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 137, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 9, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 142, - 147 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 149, - 159 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - ], - "range": [ - 142, - 160 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 139, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 162, - 167 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 168, - 175 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 37 - } - } - }, - "range": [ - 162, - 175 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 37 - } - } - }, - "range": [ - 161, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 23 - }, - "end": { - "line": 9, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 176, - 180 - ], - "loc": { - "start": { - "line": 9, - "column": 38 - }, - "end": { - "line": 9, - "column": 42 - } - } - }, - "range": [ - 139, - 180 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 180, - 181 - ], - "loc": { - "start": { - "line": 9, - "column": 42 - }, - "end": { - "line": 10, - "column": 0 - } - } - } - ], - "range": [ - 123, - 181 - ], - "loc": { - "start": { - "line": 8, - "column": 0 - }, - "end": { - "line": 10, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 162, - 167 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 131, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 162, - 167 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 131, - 136 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 229, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 9 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "s", - "identifiers": [ - { - "type": "Identifier", - "name": "s", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "s", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "s", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 283, - 286 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 17, - "column": 2 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 287, - 288 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 286, - 289 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The string is ", - "range": [ - 289, - 303 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "s", - "range": [ - 304, - 305 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 303, - 306 - ], - "loc": { - "start": { - "line": 17, - "column": 19 - }, - "end": { - "line": 17, - "column": 22 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 306, - 310 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 26 - } - } - }, - "range": [ - 286, - 310 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 26 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 310, - 312 - ], - "loc": { - "start": { - "line": 17, - "column": 26 - }, - "end": { - "line": 18, - "column": 1 - } - } - } - ], - "range": [ - 274, - 312 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 18, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 304, - 305 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 304, - 305 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 320, - 325 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 320, - 325 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 320, - 325 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 326, - 329 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 332, - 337 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 339, - 349 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 22 - } - } - } - ], - "range": [ - 332, - 350 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 23 - } - } - } - ], - "selfClosing": false, - "range": [ - 329, - 351 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 24 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 352, - 357 - ], - "loc": { - "start": { - "line": 19, - "column": 25 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 358, - 365 - ], - "loc": { - "start": { - "line": 19, - "column": 31 - }, - "end": { - "line": 19, - "column": 38 - } - } - }, - "range": [ - 352, - 365 - ], - "loc": { - "start": { - "line": 19, - "column": 25 - }, - "end": { - "line": 19, - "column": 38 - } - } - }, - "range": [ - 351, - 366 - ], - "loc": { - "start": { - "line": 19, - "column": 24 - }, - "end": { - "line": 19, - "column": 39 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 19, - "column": 39 - }, - "end": { - "line": 19, - "column": 43 - } - } - }, - "range": [ - 329, - 370 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 43 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 370, - 372 - ], - "loc": { - "start": { - "line": 19, - "column": 43 - }, - "end": { - "line": 20, - "column": 1 - } - } - } - ], - "range": [ - 312, - 372 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 20, - "column": 1 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 352, - 357 - ], - "loc": { - "start": { - "line": 19, - "column": 25 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 320, - 325 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 352, - 357 - ], - "loc": { - "start": { - "line": 19, - "column": 25 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 320, - 325 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 229, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 9 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 388, - 394 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 388, - 394 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 388, - 394 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 395, - 397 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 22, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 398, - 399 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 397, - 400 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 400, - 414 - ], - "loc": { - "start": { - "line": 22, - "column": 4 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 415, - 421 - ], - "loc": { - "start": { - "line": 22, - "column": 19 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "range": [ - 414, - 422 - ], - "loc": { - "start": { - "line": 22, - "column": 18 - }, - "end": { - "line": 22, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 422, - 426 - ], - "loc": { - "start": { - "line": 22, - "column": 26 - }, - "end": { - "line": 22, - "column": 30 - } - } - }, - "range": [ - 397, - 426 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 426, - 427 - ], - "loc": { - "start": { - "line": 22, - "column": 30 - }, - "end": { - "line": 23, - "column": 0 - } - } - } - ], - "range": [ - 381, - 427 - ], - "loc": { - "start": { - "line": 21, - "column": 0 - }, - "end": { - "line": 23, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 415, - 421 - ], - "loc": { - "start": { - "line": 22, - "column": 19 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 388, - 394 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 415, - 421 - ], - "loc": { - "start": { - "line": 22, - "column": 19 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 388, - 394 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 435, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 435, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 435, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 441, - 443 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 24, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 453, - 463 - ], - "loc": { - "start": { - "line": 24, - "column": 11 - }, - "end": { - "line": 24, - "column": 21 - } - } - } - ], - "range": [ - 446, - 464 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 443, - 465 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 466, - 471 - ], - "loc": { - "start": { - "line": 24, - "column": 24 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 472, - 479 - ], - "loc": { - "start": { - "line": 24, - "column": 30 - }, - "end": { - "line": 24, - "column": 37 - } - } - }, - "range": [ - 466, - 479 - ], - "loc": { - "start": { - "line": 24, - "column": 24 - }, - "end": { - "line": 24, - "column": 37 - } - } - }, - "range": [ - 465, - 480 - ], - "loc": { - "start": { - "line": 24, - "column": 23 - }, - "end": { - "line": 24, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 480, - 484 - ], - "loc": { - "start": { - "line": 24, - "column": 38 - }, - "end": { - "line": 24, - "column": 42 - } - } - }, - "range": [ - 443, - 484 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 24, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 42 - }, - "end": { - "line": 25, - "column": 0 - } - } - } - ], - "range": [ - 427, - 485 - ], - "loc": { - "start": { - "line": 23, - "column": 0 - }, - "end": { - "line": 25, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 466, - 471 - ], - "loc": { - "start": { - "line": 24, - "column": 24 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 435, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 466, - 471 - ], - "loc": { - "start": { - "line": 24, - "column": 24 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 435, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 8 - }, - "end": { - "line": 23, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 552, - 553 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 552, - 553 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "b", - "range": [ - 552, - 553 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 554, - 556 - ], - "loc": { - "start": { - "line": 29, - "column": 9 - }, - "end": { - "line": 30, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 557, - 558 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 556, - 559 - ], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The boolean is ", - "range": [ - 559, - 574 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "b", - "range": [ - 575, - 576 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 21 - } - } - }, - "range": [ - 574, - 577 - ], - "loc": { - "start": { - "line": 30, - "column": 19 - }, - "end": { - "line": 30, - "column": 22 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 577, - 581 - ], - "loc": { - "start": { - "line": 30, - "column": 22 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - "range": [ - 556, - 581 - ], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 581, - 582 - ], - "loc": { - "start": { - "line": 30, - "column": 26 - }, - "end": { - "line": 31, - "column": 0 - } - } - } - ], - "range": [ - 545, - 582 - ], - "loc": { - "start": { - "line": 29, - "column": 0 - }, - "end": { - "line": 31, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 575, - 576 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 552, - 553 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 575, - 576 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 552, - 553 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 590, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 590, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 590, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 596, - 598 - ], - "loc": { - "start": { - "line": 31, - "column": 14 - }, - "end": { - "line": 32, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 599, - 600 - ], - "loc": { - "start": { - "line": 32, - "column": 2 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 601, - 606 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 608, - 618 - ], - "loc": { - "start": { - "line": 32, - "column": 11 - }, - "end": { - "line": 32, - "column": 21 - } - } - } - ], - "range": [ - 601, - 619 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 598, - 620 - ], - "loc": { - "start": { - "line": 32, - "column": 1 - }, - "end": { - "line": 32, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 621, - 626 - ], - "loc": { - "start": { - "line": 32, - "column": 24 - }, - "end": { - "line": 32, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 627, - 634 - ], - "loc": { - "start": { - "line": 32, - "column": 30 - }, - "end": { - "line": 32, - "column": 37 - } - } - }, - "range": [ - 621, - 634 - ], - "loc": { - "start": { - "line": 32, - "column": 24 - }, - "end": { - "line": 32, - "column": 37 - } - } - }, - "range": [ - 620, - 635 - ], - "loc": { - "start": { - "line": 32, - "column": 23 - }, - "end": { - "line": 32, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 635, - 639 - ], - "loc": { - "start": { - "line": 32, - "column": 38 - }, - "end": { - "line": 32, - "column": 42 - } - } - }, - "range": [ - 598, - 639 - ], - "loc": { - "start": { - "line": 32, - "column": 1 - }, - "end": { - "line": 32, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 639, - 640 - ], - "loc": { - "start": { - "line": 32, - "column": 42 - }, - "end": { - "line": 33, - "column": 0 - } - } - } - ], - "range": [ - 582, - 640 - ], - "loc": { - "start": { - "line": 31, - "column": 0 - }, - "end": { - "line": 33, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 621, - 626 - ], - "loc": { - "start": { - "line": 32, - "column": 24 - }, - "end": { - "line": 32, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 590, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 621, - 626 - ], - "loc": { - "start": { - "line": 32, - "column": 24 - }, - "end": { - "line": 32, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 590, - 595 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 704, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 704, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 704, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 711, - 713 - ], - "loc": { - "start": { - "line": 37, - "column": 14 - }, - "end": { - "line": 38, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 714, - 715 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 713, - 716 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 716, - 730 - ], - "loc": { - "start": { - "line": 38, - "column": 4 - }, - "end": { - "line": 38, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 731, - 737 - ], - "loc": { - "start": { - "line": 38, - "column": 19 - }, - "end": { - "line": 38, - "column": 25 - } - } - }, - "range": [ - 730, - 738 - ], - "loc": { - "start": { - "line": 38, - "column": 18 - }, - "end": { - "line": 38, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 738, - 742 - ], - "loc": { - "start": { - "line": 38, - "column": 26 - }, - "end": { - "line": 38, - "column": 30 - } - } - }, - "range": [ - 713, - 742 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 742, - 743 - ], - "loc": { - "start": { - "line": 38, - "column": 30 - }, - "end": { - "line": 39, - "column": 0 - } - } - } - ], - "range": [ - 697, - 743 - ], - "loc": { - "start": { - "line": 37, - "column": 0 - }, - "end": { - "line": 39, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 731, - 737 - ], - "loc": { - "start": { - "line": 38, - "column": 19 - }, - "end": { - "line": 38, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 704, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 731, - 737 - ], - "loc": { - "start": { - "line": 38, - "column": 19 - }, - "end": { - "line": 38, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 704, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 751, - 756 - ], - "loc": { - "start": { - "line": 39, - "column": 8 - }, - "end": { - "line": 39, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 751, - 756 - ], - "loc": { - "start": { - "line": 39, - "column": 8 - }, - "end": { - "line": 39, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 751, - 756 - ], - "loc": { - "start": { - "line": 39, - "column": 8 - }, - "end": { - "line": 39, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 757, - 759 - ], - "loc": { - "start": { - "line": 39, - "column": 14 - }, - "end": { - "line": 40, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 760, - 761 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 762, - 767 - ], - "loc": { - "start": { - "line": 40, - "column": 4 - }, - "end": { - "line": 40, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 769, - 779 - ], - "loc": { - "start": { - "line": 40, - "column": 11 - }, - "end": { - "line": 40, - "column": 21 - } - } - } - ], - "range": [ - 762, - 780 - ], - "loc": { - "start": { - "line": 40, - "column": 4 - }, - "end": { - "line": 40, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 759, - 781 - ], - "loc": { - "start": { - "line": 40, - "column": 1 - }, - "end": { - "line": 40, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 782, - 787 - ], - "loc": { - "start": { - "line": 40, - "column": 24 - }, - "end": { - "line": 40, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 788, - 795 - ], - "loc": { - "start": { - "line": 40, - "column": 30 - }, - "end": { - "line": 40, - "column": 37 - } - } - }, - "range": [ - 782, - 795 - ], - "loc": { - "start": { - "line": 40, - "column": 24 - }, - "end": { - "line": 40, - "column": 37 - } - } - }, - "range": [ - 781, - 796 - ], - "loc": { - "start": { - "line": 40, - "column": 23 - }, - "end": { - "line": 40, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 796, - 800 - ], - "loc": { - "start": { - "line": 40, - "column": 38 - }, - "end": { - "line": 40, - "column": 42 - } - } - }, - "range": [ - 759, - 800 - ], - "loc": { - "start": { - "line": 40, - "column": 1 - }, - "end": { - "line": 40, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 800, - 801 - ], - "loc": { - "start": { - "line": 40, - "column": 42 - }, - "end": { - "line": 41, - "column": 0 - } - } - } - ], - "range": [ - 743, - 801 - ], - "loc": { - "start": { - "line": 39, - "column": 0 - }, - "end": { - "line": 41, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 782, - 787 - ], - "loc": { - "start": { - "line": 40, - "column": 24 - }, - "end": { - "line": 40, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 751, - 756 - ], - "loc": { - "start": { - "line": 39, - "column": 8 - }, - "end": { - "line": 39, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 782, - 787 - ], - "loc": { - "start": { - "line": 40, - "column": 24 - }, - "end": { - "line": 40, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 751, - 756 - ], - "loc": { - "start": { - "line": 39, - "column": 8 - }, - "end": { - "line": 39, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 865, - 871 - ], - "loc": { - "start": { - "line": 45, - "column": 7 - }, - "end": { - "line": 45, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 865, - 871 - ], - "loc": { - "start": { - "line": 45, - "column": 7 - }, - "end": { - "line": 45, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 865, - 871 - ], - "loc": { - "start": { - "line": 45, - "column": 7 - }, - "end": { - "line": 45, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 872, - 874 - ], - "loc": { - "start": { - "line": 45, - "column": 14 - }, - "end": { - "line": 46, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 875, - 876 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 874, - 877 - ], - "loc": { - "start": { - "line": 46, - "column": 1 - }, - "end": { - "line": 46, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 877, - 891 - ], - "loc": { - "start": { - "line": 46, - "column": 4 - }, - "end": { - "line": 46, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 892, - 898 - ], - "loc": { - "start": { - "line": 46, - "column": 19 - }, - "end": { - "line": 46, - "column": 25 - } - } - }, - "range": [ - 891, - 899 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 899, - 903 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "range": [ - 874, - 903 - ], - "loc": { - "start": { - "line": 46, - "column": 1 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 903, - 904 - ], - "loc": { - "start": { - "line": 46, - "column": 30 - }, - "end": { - "line": 47, - "column": 0 - } - } - } - ], - "range": [ - 858, - 904 - ], - "loc": { - "start": { - "line": 45, - "column": 0 - }, - "end": { - "line": 47, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 892, - 898 - ], - "loc": { - "start": { - "line": 46, - "column": 19 - }, - "end": { - "line": 46, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 865, - 871 - ], - "loc": { - "start": { - "line": 45, - "column": 7 - }, - "end": { - "line": 45, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 892, - 898 - ], - "loc": { - "start": { - "line": 46, - "column": 19 - }, - "end": { - "line": 46, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 865, - 871 - ], - "loc": { - "start": { - "line": 45, - "column": 7 - }, - "end": { - "line": 45, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 912, - 917 - ], - "loc": { - "start": { - "line": 47, - "column": 8 - }, - "end": { - "line": 47, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 912, - 917 - ], - "loc": { - "start": { - "line": 47, - "column": 8 - }, - "end": { - "line": 47, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 912, - 917 - ], - "loc": { - "start": { - "line": 47, - "column": 8 - }, - "end": { - "line": 47, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 918, - 920 - ], - "loc": { - "start": { - "line": 47, - "column": 14 - }, - "end": { - "line": 48, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 921, - 922 - ], - "loc": { - "start": { - "line": 48, - "column": 2 - }, - "end": { - "line": 48, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 923, - 928 - ], - "loc": { - "start": { - "line": 48, - "column": 4 - }, - "end": { - "line": 48, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 930, - 940 - ], - "loc": { - "start": { - "line": 48, - "column": 11 - }, - "end": { - "line": 48, - "column": 21 - } - } - } - ], - "range": [ - 923, - 941 - ], - "loc": { - "start": { - "line": 48, - "column": 4 - }, - "end": { - "line": 48, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 920, - 942 - ], - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 943, - 948 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 949, - 956 - ], - "loc": { - "start": { - "line": 48, - "column": 30 - }, - "end": { - "line": 48, - "column": 37 - } - } - }, - "range": [ - 943, - 956 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 37 - } - } - }, - "range": [ - 942, - 957 - ], - "loc": { - "start": { - "line": 48, - "column": 23 - }, - "end": { - "line": 48, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 957, - 961 - ], - "loc": { - "start": { - "line": 48, - "column": 38 - }, - "end": { - "line": 48, - "column": 42 - } - } - }, - "range": [ - 920, - 961 - ], - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 961, - 962 - ], - "loc": { - "start": { - "line": 48, - "column": 42 - }, - "end": { - "line": 49, - "column": 0 - } - } - } - ], - "range": [ - 904, - 962 - ], - "loc": { - "start": { - "line": 47, - "column": 0 - }, - "end": { - "line": 49, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 943, - 948 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 912, - 917 - ], - "loc": { - "start": { - "line": 47, - "column": 8 - }, - "end": { - "line": 47, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 943, - 948 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 912, - 917 - ], - "loc": { - "start": { - "line": 47, - "column": 8 - }, - "end": { - "line": 47, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 1026, - 1032 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 1026, - 1032 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 1026, - 1032 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 1033, - 1035 - ], - "loc": { - "start": { - "line": 53, - "column": 14 - }, - "end": { - "line": 54, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 1036, - 1037 - ], - "loc": { - "start": { - "line": 54, - "column": 2 - }, - "end": { - "line": 54, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 1035, - 1038 - ], - "loc": { - "start": { - "line": 54, - "column": 1 - }, - "end": { - "line": 54, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 1038, - 1052 - ], - "loc": { - "start": { - "line": 54, - "column": 4 - }, - "end": { - "line": 54, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 1053, - 1059 - ], - "loc": { - "start": { - "line": 54, - "column": 19 - }, - "end": { - "line": 54, - "column": 25 - } - } - }, - "range": [ - 1052, - 1060 - ], - "loc": { - "start": { - "line": 54, - "column": 18 - }, - "end": { - "line": 54, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1060, - 1064 - ], - "loc": { - "start": { - "line": 54, - "column": 26 - }, - "end": { - "line": 54, - "column": 30 - } - } - }, - "range": [ - 1035, - 1064 - ], - "loc": { - "start": { - "line": 54, - "column": 1 - }, - "end": { - "line": 54, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 1064, - 1065 - ], - "loc": { - "start": { - "line": 54, - "column": 30 - }, - "end": { - "line": 55, - "column": 0 - } - } - } - ], - "range": [ - 1019, - 1065 - ], - "loc": { - "start": { - "line": 53, - "column": 0 - }, - "end": { - "line": 55, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 1053, - 1059 - ], - "loc": { - "start": { - "line": 54, - "column": 19 - }, - "end": { - "line": 54, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 1026, - 1032 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 1053, - 1059 - ], - "loc": { - "start": { - "line": 54, - "column": 19 - }, - "end": { - "line": 54, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 1026, - 1032 - ], - "loc": { - "start": { - "line": 53, - "column": 7 - }, - "end": { - "line": 53, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 1073, - 1078 - ], - "loc": { - "start": { - "line": 55, - "column": 8 - }, - "end": { - "line": 55, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 1073, - 1078 - ], - "loc": { - "start": { - "line": 55, - "column": 8 - }, - "end": { - "line": 55, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 1073, - 1078 - ], - "loc": { - "start": { - "line": 55, - "column": 8 - }, - "end": { - "line": 55, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 1079, - 1081 - ], - "loc": { - "start": { - "line": 55, - "column": 14 - }, - "end": { - "line": 56, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 1082, - 1083 - ], - "loc": { - "start": { - "line": 56, - "column": 2 - }, - "end": { - "line": 56, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 1084, - 1089 - ], - "loc": { - "start": { - "line": 56, - "column": 4 - }, - "end": { - "line": 56, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 1091, - 1101 - ], - "loc": { - "start": { - "line": 56, - "column": 11 - }, - "end": { - "line": 56, - "column": 21 - } - } - } - ], - "range": [ - 1084, - 1102 - ], - "loc": { - "start": { - "line": 56, - "column": 4 - }, - "end": { - "line": 56, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 1081, - 1103 - ], - "loc": { - "start": { - "line": 56, - "column": 1 - }, - "end": { - "line": 56, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 1104, - 1109 - ], - "loc": { - "start": { - "line": 56, - "column": 24 - }, - "end": { - "line": 56, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 1110, - 1117 - ], - "loc": { - "start": { - "line": 56, - "column": 30 - }, - "end": { - "line": 56, - "column": 37 - } - } - }, - "range": [ - 1104, - 1117 - ], - "loc": { - "start": { - "line": 56, - "column": 24 - }, - "end": { - "line": 56, - "column": 37 - } - } - }, - "range": [ - 1103, - 1118 - ], - "loc": { - "start": { - "line": 56, - "column": 23 - }, - "end": { - "line": 56, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 56, - "column": 38 - }, - "end": { - "line": 56, - "column": 42 - } - } - }, - "range": [ - 1081, - 1122 - ], - "loc": { - "start": { - "line": 56, - "column": 1 - }, - "end": { - "line": 56, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 1122, - 1123 - ], - "loc": { - "start": { - "line": 56, - "column": 42 - }, - "end": { - "line": 57, - "column": 0 - } - } - } - ], - "range": [ - 1065, - 1123 - ], - "loc": { - "start": { - "line": 55, - "column": 0 - }, - "end": { - "line": 57, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 1104, - 1109 - ], - "loc": { - "start": { - "line": 56, - "column": 24 - }, - "end": { - "line": 56, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 1073, - 1078 - ], - "loc": { - "start": { - "line": 55, - "column": 8 - }, - "end": { - "line": 55, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 1104, - 1109 - ], - "loc": { - "start": { - "line": 56, - "column": 24 - }, - "end": { - "line": 56, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 1073, - 1078 - ], - "loc": { - "start": { - "line": 55, - "column": 8 - }, - "end": { - "line": 55, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 1187, - 1193 - ], - "loc": { - "start": { - "line": 61, - "column": 7 - }, - "end": { - "line": 61, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 1187, - 1193 - ], - "loc": { - "start": { - "line": 61, - "column": 7 - }, - "end": { - "line": 61, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 1187, - 1193 - ], - "loc": { - "start": { - "line": 61, - "column": 7 - }, - "end": { - "line": 61, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 1194, - 1196 - ], - "loc": { - "start": { - "line": 61, - "column": 14 - }, - "end": { - "line": 62, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 1197, - 1198 - ], - "loc": { - "start": { - "line": 62, - "column": 2 - }, - "end": { - "line": 62, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 1196, - 1199 - ], - "loc": { - "start": { - "line": 62, - "column": 1 - }, - "end": { - "line": 62, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 1199, - 1213 - ], - "loc": { - "start": { - "line": 62, - "column": 4 - }, - "end": { - "line": 62, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 1214, - 1220 - ], - "loc": { - "start": { - "line": 62, - "column": 19 - }, - "end": { - "line": 62, - "column": 25 - } - } - }, - "range": [ - 1213, - 1221 - ], - "loc": { - "start": { - "line": 62, - "column": 18 - }, - "end": { - "line": 62, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1221, - 1225 - ], - "loc": { - "start": { - "line": 62, - "column": 26 - }, - "end": { - "line": 62, - "column": 30 - } - } - }, - "range": [ - 1196, - 1225 - ], - "loc": { - "start": { - "line": 62, - "column": 1 - }, - "end": { - "line": 62, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 1225, - 1226 - ], - "loc": { - "start": { - "line": 62, - "column": 30 - }, - "end": { - "line": 63, - "column": 0 - } - } - } - ], - "range": [ - 1180, - 1226 - ], - "loc": { - "start": { - "line": 61, - "column": 0 - }, - "end": { - "line": 63, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 1214, - 1220 - ], - "loc": { - "start": { - "line": 62, - "column": 19 - }, - "end": { - "line": 62, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 1187, - 1193 - ], - "loc": { - "start": { - "line": 61, - "column": 7 - }, - "end": { - "line": 61, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 1214, - 1220 - ], - "loc": { - "start": { - "line": 62, - "column": 19 - }, - "end": { - "line": 62, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 1187, - 1193 - ], - "loc": { - "start": { - "line": 61, - "column": 7 - }, - "end": { - "line": 61, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 1234, - 1239 - ], - "loc": { - "start": { - "line": 63, - "column": 8 - }, - "end": { - "line": 63, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 1234, - 1239 - ], - "loc": { - "start": { - "line": 63, - "column": 8 - }, - "end": { - "line": 63, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 1234, - 1239 - ], - "loc": { - "start": { - "line": 63, - "column": 8 - }, - "end": { - "line": 63, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 1240, - 1242 - ], - "loc": { - "start": { - "line": 63, - "column": 14 - }, - "end": { - "line": 64, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 1243, - 1244 - ], - "loc": { - "start": { - "line": 64, - "column": 2 - }, - "end": { - "line": 64, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 1245, - 1250 - ], - "loc": { - "start": { - "line": 64, - "column": 4 - }, - "end": { - "line": 64, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 1252, - 1262 - ], - "loc": { - "start": { - "line": 64, - "column": 11 - }, - "end": { - "line": 64, - "column": 21 - } - } - } - ], - "range": [ - 1245, - 1263 - ], - "loc": { - "start": { - "line": 64, - "column": 4 - }, - "end": { - "line": 64, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 1242, - 1264 - ], - "loc": { - "start": { - "line": 64, - "column": 1 - }, - "end": { - "line": 64, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 1265, - 1270 - ], - "loc": { - "start": { - "line": 64, - "column": 24 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 1271, - 1278 - ], - "loc": { - "start": { - "line": 64, - "column": 30 - }, - "end": { - "line": 64, - "column": 37 - } - } - }, - "range": [ - 1265, - 1278 - ], - "loc": { - "start": { - "line": 64, - "column": 24 - }, - "end": { - "line": 64, - "column": 37 - } - } - }, - "range": [ - 1264, - 1279 - ], - "loc": { - "start": { - "line": 64, - "column": 23 - }, - "end": { - "line": 64, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1279, - 1283 - ], - "loc": { - "start": { - "line": 64, - "column": 38 - }, - "end": { - "line": 64, - "column": 42 - } - } - }, - "range": [ - 1242, - 1283 - ], - "loc": { - "start": { - "line": 64, - "column": 1 - }, - "end": { - "line": 64, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 1283, - 1284 - ], - "loc": { - "start": { - "line": 64, - "column": 42 - }, - "end": { - "line": 65, - "column": 0 - } - } - } - ], - "range": [ - 1226, - 1284 - ], - "loc": { - "start": { - "line": 63, - "column": 0 - }, - "end": { - "line": 65, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 1265, - 1270 - ], - "loc": { - "start": { - "line": 64, - "column": 24 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 1234, - 1239 - ], - "loc": { - "start": { - "line": 63, - "column": 8 - }, - "end": { - "line": 63, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 1265, - 1270 - ], - "loc": { - "start": { - "line": 64, - "column": 24 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 1234, - 1239 - ], - "loc": { - "start": { - "line": 63, - "column": 8 - }, - "end": { - "line": 63, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 38, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 200, - 207 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 229, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 9 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 503, - 510 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 658, - 665 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 819, - 826 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 980, - 987 - ], - "loc": { - "start": { - "line": 51, - "column": 8 - }, - "end": { - "line": 51, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 1141, - 1148 - ], - "loc": { - "start": { - "line": 59, - "column": 8 - }, - "end": { - "line": 59, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 38, - 45 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 200, - 207 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 229, - 236 - ], - "loc": { - "start": { - "line": 14, - "column": 9 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 503, - 510 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 658, - 665 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 819, - 826 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 980, - 987 - ], - "loc": { - "start": { - "line": 51, - "column": 8 - }, - "end": { - "line": 51, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Promise", - "range": [ - 1141, - 1148 - ], - "loc": { - "start": { - "line": 59, - "column": 8 - }, - "end": { - "line": 59, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json index fe02aad0..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1318 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "\"hello\"", - "value": "hello", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 27, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 10, - "column": 29 - }, - "end": { - "line": 10, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "get", - "identifiers": [ - { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "\"hello\"", - "value": "hello", - "range": [ - 59, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "range": [ - 49, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 115, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - }, - { - "name": "y", - "identifiers": [ - { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "name": "z", - "identifiers": [ - { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "z", - "range": [ - 144, - 145 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - } - ] - }, - { - "name": "getFunction", - "identifiers": [ - { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "get", - "range": [ - 115, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 101, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 164, - 175 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 115, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 49, - 52 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "z", - "range": [ - 144, - 145 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "z", - "range": [ - 88, - 89 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 10, - "column": 29 - }, - "end": { - "line": 10, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 27, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 164, - 175 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getFunction", - "range": [ - 101, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json index abc349b2..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2340 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 165, - 173 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 188, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "\"hello\"", - "value": "hello", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "range": [ - 69, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 121, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 240, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - }, - { - "name": "get", - "identifiers": [ - { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "Literal", - "raw": "\"hello\"", - "value": "hello", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 97, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "range": [ - 91, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 149, - 152 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - }, - { - "name": "y", - "identifiers": [ - { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 121, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 117, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 134, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - } - ] - }, - { - "name": "z", - "identifiers": [ - { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 134, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 130, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "z", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - } - ] - }, - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "get", - "range": [ - 149, - 152 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "range": [ - 143, - 152 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 245, - 248 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - } - } - ] - }, - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 174, - 175 - ], - "loc": { - "start": { - "line": 10, - "column": 20 - }, - "end": { - "line": 10, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 165, - 173 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 165, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 22 - } - } - }, - "range": [ - 161, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 257, - 259 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 197, - 198 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 188, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 188, - 199 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 22 - } - } - }, - "range": [ - 184, - 199 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 262, - 263 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 266, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 121, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 134, - 135 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 117, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "get", - "range": [ - 149, - 152 - ], - "loc": { - "start": { - "line": 8, - "column": 13 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "get", - "range": [ - 91, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 165, - 173 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 188, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "z", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "z", - "range": [ - 130, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 240, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 245, - 248 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 257, - 259 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 161, - 162 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 262, - 263 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 266, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 8 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json index 9ce5e535..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1110 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "s", - "range": [ - 39, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "\"hello\"", - "value": "hello", - "range": [ - 42, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 39, - 49 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "n", - "range": [ - 51, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 32 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 54, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 51, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 32 - }, - "end": { - "line": 2, - "column": 37 - } - } - } - ], - "range": [ - 38, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 38 - } - } - }, - "range": [ - 34, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - }, - { - "name": "s", - "identifiers": [ - { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "range": [ - 67, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - }, - { - "name": "n", - "identifiers": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "range": [ - 67, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "range": [ - 67, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "s", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "s", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json index c72a2998..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1064 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "xx", - "identifiers": [ - { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "\"hello\"", - "value": "hello", - "range": [ - 34, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 29, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "xx", - "range": [ - 74, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "xx", - "range": [ - 89, - 91 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "yy", - "identifiers": [ - { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "init": null, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "yy", - "range": [ - 69, - 71 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yy", - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ] - }, - { - "name": "zz", - "identifiers": [ - { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "xx", - "range": [ - 89, - 91 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "range": [ - 84, - 91 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "zz", - "range": [ - 109, - 111 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yy", - "range": [ - 69, - 71 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "xx", - "range": [ - 74, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "xx", - "range": [ - 89, - 91 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "xx", - "range": [ - 29, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yy", - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yy", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 52, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "zz", - "range": [ - 109, - 111 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zz", - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json index 5b089e63..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1724 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 76, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 140, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 76, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 76, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 72, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 166, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 170, - 172 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 170, - 172 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - }, - { - "name": "aValue", - "identifiers": [ - { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "$a", - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 95, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "aValue", - "range": [ - 175, - 181 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "bValue", - "identifiers": [ - { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "$b", - "range": [ - 123, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 114, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bValue", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "\"b\"", - "value": "b", - "range": [ - 149, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 140, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 140, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 27 - } - } - }, - "range": [ - 136, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 123, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 188, - 190 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 188, - 190 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 76, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 104, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 123, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 140, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 166, - 167 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 170, - 172 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "aValue", - "range": [ - 175, - 181 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "aValue", - "range": [ - 95, - 101 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 188, - 190 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bValue", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bValue", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json index 95fcbb9e..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4900 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "init": { - "type": "Literal", - "raw": "null", - "value": null, - "range": [ - 61, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 41 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 31, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 87, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 111, - 114 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 178, - 181 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - } - ] - }, - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "init": null, - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - } - } - ] - }, - { - "name": "r", - "identifiers": [ - { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "operator": "=", - "right": { - "type": "LogicalExpression", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "operator": "&&", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "foo", - "range": [ - 111, - 114 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "bar", - "range": [ - 115, - 118 - ], - "loc": { - "start": { - "line": 8, - "column": 18 - }, - "end": { - "line": 8, - "column": 21 - } - } - }, - "range": [ - 111, - 118 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 21 - } - } - }, - "range": [ - 104, - 118 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 21 - } - } - }, - "range": [ - 100, - 118 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - } - } - ] - }, - { - "name": "n", - "identifiers": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 127, - 130 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 127, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - } - ], - "range": [ - 125, - 135 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "operator": "=", - "right": { - "type": "LogicalExpression", - "left": { - "type": "Identifier", - "name": "foo", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "operator": "||", - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 147, - 150 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 10, - "column": 31 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "range": [ - 147, - 154 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 33 - } - } - } - ], - "range": [ - 145, - 156 - ], - "loc": { - "start": { - "line": 10, - "column": 24 - }, - "end": { - "line": 10, - "column": 35 - } - } - }, - "range": [ - 138, - 156 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 35 - } - } - }, - "range": [ - 125, - 156 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 192, - 193 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 80, - 83 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 87, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 104, - 107 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 111, - 114 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 178, - 181 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "foo", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "bar", - "range": [ - 38, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 43, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 41, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 21 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - "range": [ - 38, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 29 - } - } - } - ], - "range": [ - 36, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 34 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "range": [ - 36, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 34, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 31, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 100, - 101 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 4 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 192, - 193 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json index c3e4d86b..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1344 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Pagination", - "identifiers": [ - { - "type": "Identifier", - "name": "Pagination", - "range": [ - 100, - 110 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Pagination", - "range": [ - 100, - 110 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Pagination", - "range": [ - 100, - 110 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 100, - 110 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Pagination", - "range": [ - 293, - 303 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Pagination", - "range": [ - 100, - 110 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - } - ] - }, - { - "name": "page", - "identifiers": [ - { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 156, - 164 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "page", - "range": [ - 212, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "page", - "range": [ - 318, - 322 - ], - "loc": { - "start": { - "line": 14, - "column": 26 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "name": "perPage", - "identifiers": [ - { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "init": { - "type": "Literal", - "raw": "15", - "value": 15, - "range": [ - 182, - 184 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 172, - 184 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "perPage", - "range": [ - 201, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ] - }, - { - "name": "pageStart", - "identifiers": [ - { - "type": "Identifier", - "name": "pageStart", - "range": [ - 189, - 198 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "pageStart", - "range": [ - 189, - 198 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "pageStart", - "range": [ - 189, - 198 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "perPage", - "range": [ - 201, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "operator": "*", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "page", - "range": [ - 212, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 219, - 220 - ], - "loc": { - "start": { - "line": 7, - "column": 33 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "range": [ - 212, - 220 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "range": [ - 201, - 221 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - "range": [ - 189, - 221 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 35 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pageStart", - "range": [ - 189, - 198 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pageStart", - "range": [ - 189, - 198 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "perPage", - "range": [ - 201, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "perPage", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "page", - "range": [ - 212, - 216 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "array", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "page", - "range": [ - 318, - 322 - ], - "loc": { - "start": { - "line": 14, - "column": 26 - }, - "end": { - "line": 14, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "page", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Pagination", - "range": [ - 293, - 303 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Pagination", - "range": [ - 100, - 110 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "_", - "identifiers": [ - { - "type": "Identifier", - "name": "_", - "range": [ - 250, - 251 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "_", - "range": [ - 250, - 251 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "array", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "_", - "range": [ - 250, - 251 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 256, - 259 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "click", - "range": [ - 263, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "modifiers": [], - "range": [ - 260, - 268 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 276, - 278 - ], - "loc": { - "start": { - "line": 11, - "column": 23 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 270, - 278 - ], - "loc": { - "start": { - "line": 11, - "column": 17 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "range": [ - 260, - 279 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 26 - } - } - } - ], - "selfClosing": true, - "range": [ - 255, - 282 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 29 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 255, - 282 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 29 - } - } - } - ], - "else": null, - "range": [ - 234, - 290 - ], - "loc": { - "start": { - "line": 10, - "column": 0 - }, - "end": { - "line": 12, - "column": 7 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "array", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "array", - "range": [ - 241, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json index ab4d224b..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,360 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "src", - "identifiers": [ - { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "'Hello'", - "value": "Hello", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 62, - 65 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 62, - 65 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 26, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json index 56751e55..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2326 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 95, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 72, - 83 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "range": [ - 68, - 83 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 174, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 104, - 105 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 95, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 95, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 91, - 106 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 179, - 180 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - } - ] - }, - { - "name": "$b", - "identifiers": [ - { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'abc'", - "value": "abc", - "range": [ - 119, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "range": [ - 114, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 183, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - } - ] - }, - { - "name": "$c", - "identifiers": [ - { - "type": "Identifier", - "name": "$c", - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Type", - "name": { - "type": "Identifier", - "name": "$c", - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "node": { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "$c", - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "typeAnnotation": { - "type": "TSLiteralType", - "literal": { - "type": "Literal", - "raw": "'abc'", - "value": "abc", - "range": [ - 136, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "range": [ - 136, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "range": [ - 126, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$c", - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - } - ] - }, - { - "name": "c", - "identifiers": [ - { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "'abc'", - "value": "abc", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 149, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$c", - "range": [ - 192, - 194 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 95, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$c", - "range": [ - 131, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 174, - 176 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 179, - 180 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 183, - 185 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$b", - "range": [ - 114, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 188, - 189 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 2 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$c", - "range": [ - 192, - 194 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "$c", - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 152, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 150, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "range": [ - 149, - 154 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$unknown", - "range": [ - 197, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$unknown", - "range": [ - 197, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$unknown", - "range": [ - 197, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json index 1bfc506f..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1388 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "writable", - "identifiers": [ - { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 167, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 98, - 99 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 89, - 100 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "range": [ - 85, - 100 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - } - ] - }, - { - "name": "$a", - "identifiers": [ - { - "type": "Identifier", - "name": "$a", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 120, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 118, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "$a", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 120, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 118, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "$a", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 120, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 118, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "init": null, - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 216, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$a", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 120, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 118, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 176, - 177 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "writable", - "range": [ - 167, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 167, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "range": [ - 163, - 178 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - } - ] - }, - { - "name": "$b", - "identifiers": [ - { - "type": "Identifier", - "name": "$b", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 198, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 196, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 194, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "$b", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 198, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 196, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 194, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "$b", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 198, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 196, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 194, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "init": null, - "range": [ - 194, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 221, - 223 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$b", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 198, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 196, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 194, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 7, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writable", - "range": [ - 167, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writable", - "range": [ - 46, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$a", - "range": [ - 216, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$a", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 120, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 118, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "range": [ - 116, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$b", - "range": [ - 221, - 223 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$b", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSStringKeyword", - "range": [ - 198, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 196, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "range": [ - 194, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 25 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json index 8fd524b0..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,5162 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Writable", - "identifiers": [ - { - "type": "Identifier", - "name": "Writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "Writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "Writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "Readable", - "identifiers": [ - { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "node": { - "type": "ImportSpecifier", - "importKind": "value", - "imported": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "local": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - } - ] - }, - { - "name": "maybeUndef", - "identifiers": [ - { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "init": null, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 240, - 251 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 301, - 312 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 301, - 312 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - } - ] - }, - { - "name": "maybeNull", - "identifiers": [ - { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "init": null, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 255, - 265 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 315, - 325 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 315, - 325 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - } - ] - }, - { - "name": "maybeNullAndStr", - "identifiers": [ - { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "init": null, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 269, - 285 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 328, - 344 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 328, - 344 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - } - ] - }, - { - "name": "fn", - "identifiers": [ - { - "type": "Identifier", - "name": "fn", - "range": [ - 231, - 233 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "fn", - "range": [ - 231, - 233 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 240, - 251 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "range": [ - 240, - 252 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 14 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 255, - 265 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "range": [ - 255, - 266 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 269, - 285 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "range": [ - 269, - 286 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 19 - } - } - } - ], - "range": [ - 236, - 289 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 11, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "fn", - "range": [ - 231, - 233 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "params": [], - "range": [ - 222, - 289 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 11, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Writable", - "range": [ - 29, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Readable", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 301, - 312 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 315, - 325 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 328, - 344 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 240, - 251 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 255, - 265 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 269, - 285 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$maybeUndef", - "range": [ - 240, - 251 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeUndef", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSNumberKeyword", - "range": [ - 97, - 103 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - ], - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Writable", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 88, - 104 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - }, - { - "type": "TSUndefinedKeyword", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 36 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - ], - "range": [ - 88, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 86, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - "range": [ - 76, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNull", - "range": [ - 255, - 265 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNull", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSStringKeyword", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 141, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 133, - 141 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "range": [ - 133, - 149 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 152, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 35 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 133, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 131, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 122, - 156 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$maybeNullAndStr", - "range": [ - 269, - 285 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "maybeNullAndStr", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSUnionType", - "types": [ - { - "type": "TSTypeReference", - "typeArguments": { - "type": "TSTypeParameterInstantiation", - "params": [ - { - "type": "TSBooleanKeyword", - "range": [ - 188, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 38 - } - } - } - ], - "range": [ - 187, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "typeName": { - "type": "Identifier", - "name": "Readable", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "range": [ - 179, - 196 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "TSNullKeyword", - "range": [ - 199, - 203 - ], - "loc": { - "start": { - "line": 5, - "column": 42 - }, - "end": { - "line": 5, - "column": 46 - } - } - }, - { - "type": "TSStringKeyword", - "range": [ - 206, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - ], - "range": [ - 179, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 22 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 177, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 162, - 212 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json index 5dc49a79..521634fa 100644 --- a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3892 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "MyActionParam", - "identifiers": [ - { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Type", - "name": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "TSTypeAliasDeclaration", - "id": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "typeAnnotation": { - "type": "TSFunctionType", - "params": [], - "returnType": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSFunctionType", - "params": [ - { - "type": "Identifier", - "name": "p", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 38 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 59, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 40 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 46 - } - } - } - ], - "range": [ - 52, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 50, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 49, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 48 - } - } - } - ], - "returnType": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSVoidKeyword", - "range": [ - 72, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 53 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 50 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 48, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 45, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 42, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 21, - 77 - ], - "loc": { - "start": { - "line": 2, - "column": 2 - }, - "end": { - "line": 2, - "column": 58 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "name": "myAction", - "identifiers": [ - { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "params", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 162, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "range": [ - 153, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - ], - "range": [ - 147, - 171 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "range": [ - 183, - 193 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "result", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 176, - 194 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "range": [ - 176, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 215, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 230, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "range": [ - 215, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "range": [ - 207, - 239 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "range": [ - 200, - 240 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - ], - "range": [ - 141, - 244 - ], - "loc": { - "start": { - "line": 3, - "column": 63 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "_node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 103, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 98, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - } - ], - "range": [ - 80, - 244 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "myAction", - "range": [ - 359, - 367 - ], - "loc": { - "start": { - "line": 19, - "column": 18 - }, - "end": { - "line": 19, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "myAction", - "range": [ - 267, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Parameters", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 19, - "column": 0 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "myAction", - "range": [ - 359, - 367 - ], - "loc": { - "start": { - "line": 19, - "column": 18 - }, - "end": { - "line": 19, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "myAction", - "range": [ - 267, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "functionType", - "variables": [], - "references": [], - "childScopes": [ - { - "type": "functionType", - "variables": [ - { - "name": "p", - "identifiers": [ - { - "type": "Identifier", - "name": "p", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 38 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 59, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 40 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 46 - } - } - } - ], - "range": [ - 52, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 50, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 49, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 48 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "p", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 38 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 59, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 40 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 46 - } - } - } - ], - "range": [ - 52, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 50, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 49, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "node": { - "type": "TSFunctionType", - "params": [ - { - "type": "Identifier", - "name": "p", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeLiteral", - "members": [ - { - "type": "TSPropertySignature", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 38 - } - } - }, - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSNumberKeyword", - "range": [ - 59, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 40 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 46 - } - } - }, - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 46 - } - } - } - ], - "range": [ - 52, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 33 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 50, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 31 - }, - "end": { - "line": 2, - "column": 48 - } - } - }, - "range": [ - 49, - 67 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 48 - } - } - } - ], - "returnType": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSVoidKeyword", - "range": [ - 72, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 53 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 69, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 50 - }, - "end": { - "line": 2, - "column": 57 - } - } - }, - "range": [ - 48, - 76 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 57 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "_node", - "identifiers": [ - { - "type": "Identifier", - "name": "_node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 103, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 98, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 38 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "_node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 103, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 98, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "params", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 162, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "range": [ - 153, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - ], - "range": [ - 147, - 171 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "range": [ - 183, - 193 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "result", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 176, - 194 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "range": [ - 176, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 215, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 230, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "range": [ - 215, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "range": [ - 207, - 239 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "range": [ - 200, - 240 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - ], - "range": [ - 141, - 244 - ], - "loc": { - "start": { - "line": 3, - "column": 63 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "_node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 103, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 98, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - } - ], - "range": [ - 80, - 244 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - } - ], - "references": [] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "params", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 162, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "range": [ - 153, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - ], - "range": [ - 147, - 171 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "foo", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "range": [ - 183, - 193 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "result", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 176, - 194 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "range": [ - 176, - 195 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "destroy", - "range": [ - 215, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [], - "range": [ - 230, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 224, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "range": [ - 215, - 232 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "range": [ - 207, - 239 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 8, - "column": 5 - } - } - }, - "range": [ - 200, - 240 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 8, - "column": 6 - } - } - } - ], - "range": [ - 141, - 244 - ], - "loc": { - "start": { - "line": 3, - "column": 63 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "myAction", - "range": [ - 89, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "_node", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 103, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 98, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - } - ], - "range": [ - 80, - 244 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - } - } - ] - }, - { - "name": "result", - "identifiers": [ - { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "params", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 162, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "range": [ - 153, - 170 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "result", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "params", - "range": [ - 162, - 168 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "params", - "typeAnnotation": { - "type": "TSTypeAnnotation", - "typeAnnotation": { - "type": "TSTypeReference", - "typeName": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 124, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "range": [ - 118, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 40 - }, - "end": { - "line": 3, - "column": 61 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "result", - "range": [ - 176, - 182 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "result", - "range": [ - 153, - 159 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 126, - 139 - ], - "loc": { - "start": { - "line": 3, - "column": 48 - }, - "end": { - "line": 3, - "column": 61 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MyActionParam", - "range": [ - 26, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "param", - "identifiers": [ - { - "type": "Identifier", - "name": "param", - "range": [ - 297, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "param", - "range": [ - 297, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "param", - "range": [ - 315, - 320 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "foo", - "range": [ - 321, - 324 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 15 - } - } - }, - "range": [ - 315, - 324 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 15 - } - } - }, - "range": [ - 315, - 325 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 16 - } - } - } - ], - "range": [ - 307, - 331 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 16, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "param", - "range": [ - 297, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 17 - } - } - } - ], - "range": [ - 296, - 331 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 16, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "param", - "range": [ - 315, - 320 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "param", - "range": [ - 297, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "param", - "range": [ - 315, - 320 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "param", - "range": [ - 297, - 302 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "HTMLElement", - "range": [ - 105, - 116 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Parameters", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 19, - "column": 0 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json index 4ab995a6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,5904 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "pannable", - "identifiers": [ - { - "type": "Identifier", - "name": "pannable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "pannable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "pannable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "pannable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pannable", - "range": [ - 818, - 826 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pannable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "spring", - "identifiers": [ - { - "type": "Identifier", - "name": "spring", - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "spring", - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "spring", - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "local": { - "type": "Identifier", - "name": "spring", - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "spring", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spring", - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ] - }, - { - "name": "coords", - "identifiers": [ - { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 119, - 120 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 122, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 28 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "range": [ - 119, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 128, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 34 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - "range": [ - 125, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - ], - "range": [ - 117, - 131 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 37 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "stiffness", - "range": [ - 137, - 146 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0.2", - "value": 0.2, - "range": [ - 148, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "range": [ - 137, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "damping", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0.4", - "value": 0.4, - "range": [ - 164, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "range": [ - 155, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 14 - } - } - } - ], - "range": [ - 133, - 170 - ], - "loc": { - "start": { - "line": 5, - "column": 39 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "spring", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 110, - 171 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 8, - "column": 3 - } - } - }, - "range": [ - 101, - 171 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 205, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 224, - 230 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 283, - 289 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 425, - 431 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 451, - 457 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 943, - 950 - ], - "loc": { - "start": { - "line": 49, - "column": 13 - }, - "end": { - "line": 49, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 957, - 964 - ], - "loc": { - "start": { - "line": 49, - "column": 27 - }, - "end": { - "line": 49, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 957, - 964 - ], - "loc": { - "start": { - "line": 49, - "column": 27 - }, - "end": { - "line": 49, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 981, - 988 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 981, - 988 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handlePanStart", - "identifiers": [ - { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 184, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 184, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 205, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "stiffness", - "range": [ - 212, - 221 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "range": [ - 205, - 221 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "operator": "=", - "right": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 224, - 230 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "damping", - "range": [ - 231, - 238 - ], - "loc": { - "start": { - "line": 11, - "column": 28 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "range": [ - 224, - 238 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 35 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 241, - 242 - ], - "loc": { - "start": { - "line": 11, - "column": 38 - }, - "end": { - "line": 11, - "column": 39 - } - } - }, - "range": [ - 224, - 242 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 39 - } - } - }, - "range": [ - 205, - 242 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 39 - } - } - }, - "range": [ - 205, - 243 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 40 - } - } - } - ], - "range": [ - 201, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 12, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 184, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "params": [], - "range": [ - 175, - 246 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 12, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 841, - 855 - ], - "loc": { - "start": { - "line": 45, - "column": 14 - }, - "end": { - "line": 45, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 184, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - } - ] - }, - { - "name": "handlePanMove", - "identifiers": [ - { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 314, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "$coords", - "range": [ - 317, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 325, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "range": [ - 317, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 329, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 335, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 24 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "range": [ - 329, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "dx", - "range": [ - 342, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 31 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 329, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 317, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 314, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 349, - 350 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "$coords", - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 360, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "range": [ - 352, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 370, - 376 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 364, - 376 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "dy", - "range": [ - 377, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 31 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 352, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 349, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 33 - } - } - } - ], - "range": [ - 309, - 383 - ], - "loc": { - "start": { - "line": 15, - "column": 28 - }, - "end": { - "line": 18, - "column": 3 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - ], - "range": [ - 297, - 384 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 283, - 289 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "update", - "range": [ - 290, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 15 - } - } - }, - "range": [ - 283, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 15 - } - } - }, - "optional": false, - "range": [ - 283, - 385 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 283, - 386 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 6 - } - } - } - ], - "range": [ - 279, - 389 - ], - "loc": { - "start": { - "line": 14, - "column": 31 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - ], - "range": [ - 249, - 389 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 19, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 870, - 883 - ], - "loc": { - "start": { - "line": 46, - "column": 13 - }, - "end": { - "line": 46, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 23 - } - } - } - } - ] - }, - { - "name": "handlePanEnd", - "identifiers": [ - { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 401, - 413 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 401, - 413 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 425, - 431 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "stiffness", - "range": [ - 432, - 441 - ], - "loc": { - "start": { - "line": 22, - "column": 9 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - "range": [ - 425, - 441 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "0.2", - "value": 0.2, - "range": [ - 444, - 447 - ], - "loc": { - "start": { - "line": 22, - "column": 21 - }, - "end": { - "line": 22, - "column": 24 - } - } - }, - "range": [ - 425, - 447 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 24 - } - } - }, - "range": [ - 425, - 448 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 451, - 457 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "damping", - "range": [ - 458, - 465 - ], - "loc": { - "start": { - "line": 23, - "column": 9 - }, - "end": { - "line": 23, - "column": 16 - } - } - }, - "range": [ - 451, - 465 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 16 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "0.4", - "value": 0.4, - "range": [ - 468, - 471 - ], - "loc": { - "start": { - "line": 23, - "column": 19 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "range": [ - 451, - 471 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "range": [ - 451, - 472 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 23 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 488, - 489 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 491, - 492 - ], - "loc": { - "start": { - "line": 24, - "column": 18 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "range": [ - 488, - 492 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 494, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 497, - 498 - ], - "loc": { - "start": { - "line": 24, - "column": 24 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "range": [ - 494, - 498 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 25 - } - } - } - ], - "range": [ - 486, - 500 - ], - "loc": { - "start": { - "line": 24, - "column": 13 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "set", - "range": [ - 482, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "range": [ - 475, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 475, - 501 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 475, - 502 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 29 - } - } - } - ], - "range": [ - 421, - 505 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 25, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 401, - 413 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 414, - 419 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 28 - } - } - } - ], - "range": [ - 392, - 505 - ], - "loc": { - "start": { - "line": 21, - "column": 1 - }, - "end": { - "line": 25, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 897, - 909 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 401, - 413 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "spring", - "range": [ - 110, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spring", - "range": [ - 62, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pannable", - "range": [ - 818, - 826 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pannable", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 841, - 855 - ], - "loc": { - "start": { - "line": 45, - "column": 14 - }, - "end": { - "line": 45, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handlePanStart", - "range": [ - 184, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 870, - 883 - ], - "loc": { - "start": { - "line": 46, - "column": 13 - }, - "end": { - "line": 46, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 897, - 909 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 401, - 413 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 943, - 950 - ], - "loc": { - "start": { - "line": 49, - "column": 13 - }, - "end": { - "line": 49, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 957, - 964 - ], - "loc": { - "start": { - "line": 49, - "column": 27 - }, - "end": { - "line": 49, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 981, - 988 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 205, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 224, - 230 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 205, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 224, - 230 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 314, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "$coords", - "range": [ - 317, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 325, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "range": [ - 317, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 329, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 335, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 24 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "range": [ - 329, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "dx", - "range": [ - 342, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 31 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 329, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 317, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 314, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 349, - 350 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "$coords", - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 360, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "range": [ - 352, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 370, - 376 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 364, - 376 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "dy", - "range": [ - 377, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 31 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 352, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 349, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 33 - } - } - } - ], - "range": [ - 309, - 383 - ], - "loc": { - "start": { - "line": 15, - "column": 28 - }, - "end": { - "line": 18, - "column": 3 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - ], - "range": [ - 297, - 384 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 283, - 289 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "update", - "range": [ - 290, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 15 - } - } - }, - "range": [ - 283, - 296 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 15 - } - } - }, - "optional": false, - "range": [ - 283, - 385 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 283, - 386 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 18, - "column": 6 - } - } - } - ], - "range": [ - 279, - 389 - ], - "loc": { - "start": { - "line": 14, - "column": 31 - }, - "end": { - "line": 19, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handlePanMove", - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - ], - "range": [ - 249, - 389 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 19, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 329, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 283, - 289 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "$coords", - "identifiers": [ - { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 314, - 315 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "$coords", - "range": [ - 317, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 325, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "range": [ - 317, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 329, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 335, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 24 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "range": [ - 329, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "dx", - "range": [ - 342, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 31 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 329, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 317, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - "range": [ - 314, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 33 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 349, - 350 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 4 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "$coords", - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 360, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "range": [ - 352, - 361 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "operator": "+", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 370, - 376 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 364, - 376 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "dy", - "range": [ - 377, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 31 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 352, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "range": [ - 349, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 33 - } - } - } - ], - "range": [ - 309, - 383 - ], - "loc": { - "start": { - "line": 15, - "column": 28 - }, - "end": { - "line": 18, - "column": 3 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - ], - "range": [ - 297, - 384 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 18, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 317, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 317, - 324 - ], - "loc": { - "start": { - "line": 16, - "column": 6 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 329, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "$coords", - "range": [ - 297, - 304 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 329, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 364, - 369 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 283, - 289 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 414, - 419 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 414, - 419 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 28 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 425, - 431 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "stiffness", - "range": [ - 432, - 441 - ], - "loc": { - "start": { - "line": 22, - "column": 9 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - "range": [ - 425, - 441 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "0.2", - "value": 0.2, - "range": [ - 444, - 447 - ], - "loc": { - "start": { - "line": 22, - "column": 21 - }, - "end": { - "line": 22, - "column": 24 - } - } - }, - "range": [ - 425, - 447 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 24 - } - } - }, - "range": [ - 425, - 448 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 451, - 457 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "damping", - "range": [ - 458, - 465 - ], - "loc": { - "start": { - "line": 23, - "column": 9 - }, - "end": { - "line": 23, - "column": 16 - } - } - }, - "range": [ - 451, - 465 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 16 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "0.4", - "value": 0.4, - "range": [ - 468, - 471 - ], - "loc": { - "start": { - "line": 23, - "column": 19 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "range": [ - 451, - 471 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "range": [ - 451, - 472 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 23 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 488, - 489 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 491, - 492 - ], - "loc": { - "start": { - "line": 24, - "column": 18 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "range": [ - 488, - 492 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 494, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 497, - 498 - ], - "loc": { - "start": { - "line": 24, - "column": 24 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "range": [ - 494, - 498 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 25 - } - } - } - ], - "range": [ - 486, - 500 - ], - "loc": { - "start": { - "line": 24, - "column": 13 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "set", - "range": [ - 482, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "range": [ - 475, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 475, - 501 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 475, - 502 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 29 - } - } - } - ], - "range": [ - 421, - 505 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 25, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handlePanEnd", - "range": [ - 401, - 413 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 414, - 419 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 28 - } - } - } - ], - "range": [ - 392, - 505 - ], - "loc": { - "start": { - "line": 21, - "column": 1 - }, - "end": { - "line": 25, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 425, - 431 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 451, - 457 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 425, - 431 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 451, - 457 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json index 46e96fe8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,280 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'world'", - "value": "world", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 14, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 52, - 56 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json index b97f9daf..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1271 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "longpress", - "identifiers": [ - { - "type": "Identifier", - "name": "longpress", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "longpress", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "longpress", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "local": { - "type": "Identifier", - "name": "longpress", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "longpress", - "range": [ - 218, - 227 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "longpress", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "pressed", - "identifiers": [ - { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "range": [ - 60, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 261, - 268 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 301, - 308 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 350, - 357 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "Literal", - "raw": "2000", - "value": 2000, - "range": [ - 93, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "range": [ - 82, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 149, - 157 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 229, - 237 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 406, - 414 - ], - "loc": { - "start": { - "line": 19, - "column": 47 - }, - "end": { - "line": 19, - "column": 55 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 149, - 157 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 184, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 229, - 237 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "longpress", - "range": [ - 218, - 227 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "longpress", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 350, - 357 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 261, - 268 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 261, - 268 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 301, - 308 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "pressed", - "range": [ - 301, - 308 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "pressed", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 406, - 414 - ], - "loc": { - "start": { - "line": 19, - "column": 47 - }, - "end": { - "line": 19, - "column": 55 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 406, - 414 - ], - "loc": { - "start": { - "line": 19, - "column": 47 - }, - "end": { - "line": 19, - "column": 55 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 82, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json index ea6aae9f..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,591 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "fly", - "identifiers": [ - { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "local": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 187, - 190 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "range": [ - 56, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 129, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 163, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 129, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 163, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 56, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 187, - 190 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 187, - 190 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json index 72f4b5e7..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,21427 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "flip", - "identifiers": [ - { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 12 - }, - "end": { - "line": 69, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 1938, - 1942 - ], - "loc": { - "start": { - "line": 85, - "column": 12 - }, - "end": { - "line": 85, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "quintOut", - "identifiers": [ - { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ] - }, - { - "name": "crossfade", - "identifiers": [ - { - "type": "Identifier", - "name": "crossfade", - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "local": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 166, - 175 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "send", - "identifiers": [ - { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ArrayPattern", - "elements": [ - { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "range": [ - 148, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 180, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "d", - "range": [ - 205, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 209, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "range": [ - 205, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 195, - 204 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 195, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "range": [ - 190, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - "range": [ - 180, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "fallback", - "range": [ - 218, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 260, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 39 - } - } - }, - "range": [ - 252, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 39 - } - } - } - ], - "range": [ - 246, - 283 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 345, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 61 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 339, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 334, - 336 - ], - "loc": { - "start": { - "line": 11, - "column": 50 - }, - "end": { - "line": 11, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 311, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 27 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "range": [ - 305, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 325, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 41 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 293, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 70 - } - } - } - ], - "range": [ - 287, - 355 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 373, - 381 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 383, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - "range": [ - 373, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 392, - 398 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "range": [ - 392, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 414, - 417 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 453, - 463 - ], - "loc": { - "start": { - "line": 17, - "column": 27 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 464, - 484 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 424, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - ], - "range": [ - 419, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "range": [ - 414, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 367, - 497 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 360, - 498 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 20, - "column": 5 - } - } - } - ], - "range": [ - 241, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 233, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "range": [ - 226, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 218, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 21, - "column": 3 - } - } - } - ], - "range": [ - 176, - 505 - ], - "loc": { - "start": { - "line": 6, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 166, - 175 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 166, - 506 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 22, - "column": 3 - } - } - }, - "range": [ - 148, - 506 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 22, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1521, - 1525 - ], - "loc": { - "start": { - "line": 68, - "column": 8 - }, - "end": { - "line": 68, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1902, - 1906 - ], - "loc": { - "start": { - "line": 84, - "column": 8 - }, - "end": { - "line": 84, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - } - ] - }, - { - "name": "receive", - "identifiers": [ - { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ArrayPattern", - "elements": [ - { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - ], - "range": [ - 148, - 163 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 180, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "d", - "range": [ - 205, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 209, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "range": [ - 205, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 195, - 204 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 195, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "range": [ - 190, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - "range": [ - 180, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "fallback", - "range": [ - 218, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 260, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 39 - } - } - }, - "range": [ - 252, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 39 - } - } - } - ], - "range": [ - 246, - 283 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 345, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 61 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 339, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 334, - 336 - ], - "loc": { - "start": { - "line": 11, - "column": 50 - }, - "end": { - "line": 11, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 311, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 27 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "range": [ - 305, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 325, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 41 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 293, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 70 - } - } - } - ], - "range": [ - 287, - 355 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 373, - 381 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 383, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - "range": [ - 373, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 392, - 398 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "range": [ - 392, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 414, - 417 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 453, - 463 - ], - "loc": { - "start": { - "line": 17, - "column": 27 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 464, - 484 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 424, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - ], - "range": [ - 419, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "range": [ - 414, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 367, - 497 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 360, - 498 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 20, - "column": 5 - } - } - } - ], - "range": [ - 241, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 233, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "range": [ - 226, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 218, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 21, - "column": 3 - } - } - } - ], - "range": [ - 176, - 505 - ], - "loc": { - "start": { - "line": 6, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 166, - 175 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 166, - 506 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 22, - "column": 3 - } - } - }, - "range": [ - 148, - 506 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 22, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1486, - 1493 - ], - "loc": { - "start": { - "line": 67, - "column": 7 - }, - "end": { - "line": 67, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1867, - 1874 - ], - "loc": { - "start": { - "line": 83, - "column": 7 - }, - "end": { - "line": 83, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - } - ] - }, - { - "name": "uid", - "identifiers": [ - { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 520, - 521 - ], - "loc": { - "start": { - "line": 24, - "column": 11 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "range": [ - 514, - 521 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 547, - 550 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 609, - 612 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 679, - 682 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 739, - 742 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 798, - 801 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 860, - 863 - ], - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 32, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 964, - 967 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - } - ] - }, - { - "name": "todos", - "identifiers": [ - { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 543, - 545 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 547, - 550 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 547, - 552 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "range": [ - 543, - 552 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 554, - 558 - ], - "loc": { - "start": { - "line": 27, - "column": 15 - }, - "end": { - "line": 27, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 560, - 565 - ], - "loc": { - "start": { - "line": 27, - "column": 21 - }, - "end": { - "line": 27, - "column": 26 - } - } - }, - "range": [ - 554, - 565 - ], - "loc": { - "start": { - "line": 27, - "column": 15 - }, - "end": { - "line": 27, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 567, - 578 - ], - "loc": { - "start": { - "line": 27, - "column": 28 - }, - "end": { - "line": 27, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'write some docs'", - "value": "write some docs", - "range": [ - 580, - 597 - ], - "loc": { - "start": { - "line": 27, - "column": 41 - }, - "end": { - "line": 27, - "column": 58 - } - } - }, - "range": [ - 567, - 597 - ], - "loc": { - "start": { - "line": 27, - "column": 28 - }, - "end": { - "line": 27, - "column": 58 - } - } - } - ], - "range": [ - 541, - 599 - ], - "loc": { - "start": { - "line": 27, - "column": 2 - }, - "end": { - "line": 27, - "column": 60 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 605, - 607 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 609, - 612 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 13 - } - } - }, - "range": [ - 605, - 614 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 616, - 620 - ], - "loc": { - "start": { - "line": 28, - "column": 15 - }, - "end": { - "line": 28, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 622, - 627 - ], - "loc": { - "start": { - "line": 28, - "column": 21 - }, - "end": { - "line": 28, - "column": 26 - } - } - }, - "range": [ - 616, - 627 - ], - "loc": { - "start": { - "line": 28, - "column": 15 - }, - "end": { - "line": 28, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 629, - 640 - ], - "loc": { - "start": { - "line": 28, - "column": 28 - }, - "end": { - "line": 28, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'start writing blog post'", - "value": "start writing blog post", - "range": [ - 642, - 667 - ], - "loc": { - "start": { - "line": 28, - "column": 41 - }, - "end": { - "line": 28, - "column": 66 - } - } - }, - "range": [ - 629, - 667 - ], - "loc": { - "start": { - "line": 28, - "column": 28 - }, - "end": { - "line": 28, - "column": 66 - } - } - } - ], - "range": [ - 603, - 669 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 68 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 675, - 677 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 679, - 682 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 679, - 684 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "range": [ - 675, - 684 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 686, - 690 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 692, - 696 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 25 - } - } - }, - "range": [ - 686, - 696 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 699, - 710 - ], - "loc": { - "start": { - "line": 29, - "column": 28 - }, - "end": { - "line": 29, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'buy some milk'", - "value": "buy some milk", - "range": [ - 712, - 727 - ], - "loc": { - "start": { - "line": 29, - "column": 41 - }, - "end": { - "line": 29, - "column": 56 - } - } - }, - "range": [ - 699, - 727 - ], - "loc": { - "start": { - "line": 29, - "column": 28 - }, - "end": { - "line": 29, - "column": 56 - } - } - } - ], - "range": [ - 673, - 729 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 58 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 735, - 737 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 739, - 742 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 739, - 744 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 13 - } - } - }, - "range": [ - 735, - 744 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 746, - 750 - ], - "loc": { - "start": { - "line": 30, - "column": 15 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 752, - 757 - ], - "loc": { - "start": { - "line": 30, - "column": 21 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - "range": [ - 746, - 757 - ], - "loc": { - "start": { - "line": 30, - "column": 15 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 759, - 770 - ], - "loc": { - "start": { - "line": 30, - "column": 28 - }, - "end": { - "line": 30, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'mow the lawn'", - "value": "mow the lawn", - "range": [ - 772, - 786 - ], - "loc": { - "start": { - "line": 30, - "column": 41 - }, - "end": { - "line": 30, - "column": 55 - } - } - }, - "range": [ - 759, - 786 - ], - "loc": { - "start": { - "line": 30, - "column": 28 - }, - "end": { - "line": 30, - "column": 55 - } - } - } - ], - "range": [ - 733, - 788 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 57 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 794, - 796 - ], - "loc": { - "start": { - "line": 31, - "column": 4 - }, - "end": { - "line": 31, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 798, - 801 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 798, - 803 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - }, - "range": [ - 794, - 803 - ], - "loc": { - "start": { - "line": 31, - "column": 4 - }, - "end": { - "line": 31, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 805, - 809 - ], - "loc": { - "start": { - "line": 31, - "column": 15 - }, - "end": { - "line": 31, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 811, - 816 - ], - "loc": { - "start": { - "line": 31, - "column": 21 - }, - "end": { - "line": 31, - "column": 26 - } - } - }, - "range": [ - 805, - 816 - ], - "loc": { - "start": { - "line": 31, - "column": 15 - }, - "end": { - "line": 31, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 818, - 829 - ], - "loc": { - "start": { - "line": 31, - "column": 28 - }, - "end": { - "line": 31, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'feed the turtle'", - "value": "feed the turtle", - "range": [ - 831, - 848 - ], - "loc": { - "start": { - "line": 31, - "column": 41 - }, - "end": { - "line": 31, - "column": 58 - } - } - }, - "range": [ - 818, - 848 - ], - "loc": { - "start": { - "line": 31, - "column": 28 - }, - "end": { - "line": 31, - "column": 58 - } - } - } - ], - "range": [ - 792, - 850 - ], - "loc": { - "start": { - "line": 31, - "column": 2 - }, - "end": { - "line": 31, - "column": 60 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 856, - 858 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 860, - 863 - ], - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 32, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 860, - 865 - ], - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 32, - "column": 13 - } - } - }, - "range": [ - 856, - 865 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 867, - 871 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 873, - 878 - ], - "loc": { - "start": { - "line": 32, - "column": 21 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "range": [ - 867, - 878 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 880, - 891 - ], - "loc": { - "start": { - "line": 32, - "column": 28 - }, - "end": { - "line": 32, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'fix some bugs'", - "value": "fix some bugs", - "range": [ - 893, - 908 - ], - "loc": { - "start": { - "line": 32, - "column": 41 - }, - "end": { - "line": 32, - "column": 56 - } - } - }, - "range": [ - 880, - 908 - ], - "loc": { - "start": { - "line": 32, - "column": 28 - }, - "end": { - "line": 32, - "column": 56 - } - } - } - ], - "range": [ - 854, - 910 - ], - "loc": { - "start": { - "line": 32, - "column": 2 - }, - "end": { - "line": 32, - "column": 58 - } - } - } - ], - "range": [ - 537, - 914 - ], - "loc": { - "start": { - "line": 26, - "column": 13 - }, - "end": { - "line": 33, - "column": 2 - } - } - }, - "range": [ - 529, - 914 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 33, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1023, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1041, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 20 - }, - "end": { - "line": 42, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1100, - 1105 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1108, - 1113 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1210, - 1215 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1218, - 1223 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1423, - 1428 - ], - "loc": { - "start": { - "line": 65, - "column": 9 - }, - "end": { - "line": 65, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1788, - 1793 - ], - "loc": { - "start": { - "line": 80, - "column": 9 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - } - ] - }, - { - "name": "add", - "identifiers": [ - { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 960, - 962 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 964, - 967 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 10 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 964, - 969 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "range": [ - 960, - 969 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 974, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 980, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 9 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - "range": [ - 974, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 990, - 1001 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1003, - 1008 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1009, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 22 - }, - "end": { - "line": 39, - "column": 27 - } - } - }, - "range": [ - 1003, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 27 - } - } - }, - "range": [ - 990, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 27 - } - } - } - ], - "range": [ - 955, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 40, - "column": 3 - } - } - }, - "range": [ - 948, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 40, - "column": 3 - } - } - } - ], - "range": [ - 942, - 1019 - ], - "loc": { - "start": { - "line": 36, - "column": 2 - }, - "end": { - "line": 40, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1023, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1032, - 1036 - ], - "loc": { - "start": { - "line": 42, - "column": 11 - }, - "end": { - "line": 42, - "column": 15 - } - } - }, - { - "type": "SpreadElement", - "argument": { - "type": "Identifier", - "name": "todos", - "range": [ - 1041, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 20 - }, - "end": { - "line": 42, - "column": 25 - } - } - }, - "range": [ - 1038, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 17 - }, - "end": { - "line": 42, - "column": 25 - } - } - } - ], - "range": [ - 1031, - 1047 - ], - "loc": { - "start": { - "line": 42, - "column": 10 - }, - "end": { - "line": 42, - "column": 26 - } - } - }, - "range": [ - 1023, - 1047 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 26 - } - } - }, - "range": [ - 1023, - 1048 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 27 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1051, - 1056 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1057, - 1062 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - }, - "range": [ - 1051, - 1062 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 1065, - 1067 - ], - "loc": { - "start": { - "line": 43, - "column": 16 - }, - "end": { - "line": 43, - "column": 18 - } - } - }, - "range": [ - 1051, - 1067 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 18 - } - } - }, - "range": [ - 1051, - 1068 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 19 - } - } - } - ], - "range": [ - 938, - 1071 - ], - "loc": { - "start": { - "line": 35, - "column": 21 - }, - "end": { - "line": 44, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - ], - "range": [ - 918, - 1071 - ], - "loc": { - "start": { - "line": 35, - "column": 1 - }, - "end": { - "line": 44, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 1359, - 1362 - ], - "loc": { - "start": { - "line": 60, - "column": 40 - }, - "end": { - "line": 60, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - } - } - ] - }, - { - "name": "remove", - "identifiers": [ - { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1100, - 1105 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 1126, - 1127 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 29 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "todo", - "range": [ - 1132, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 34 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "range": [ - 1126, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - } - ], - "range": [ - 1121, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1108, - 1113 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1114, - 1120 - ], - "loc": { - "start": { - "line": 47, - "column": 16 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "range": [ - 1108, - 1120 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1108, - 1137 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 39 - } - } - }, - "range": [ - 1100, - 1137 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 39 - } - } - }, - "range": [ - 1100, - 1138 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 40 - } - } - } - ], - "range": [ - 1096, - 1141 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 48, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - } - ], - "range": [ - 1074, - 1141 - ], - "loc": { - "start": { - "line": 46, - "column": 1 - }, - "end": { - "line": 48, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1194, - 1200 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1680, - 1686 - ], - "loc": { - "start": { - "line": 73, - "column": 29 - }, - "end": { - "line": 73, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 2090, - 2096 - ], - "loc": { - "start": { - "line": 89, - "column": 29 - }, - "end": { - "line": 89, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - } - ] - }, - { - "name": "mark", - "identifiers": [ - { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1179, - 1183 - ], - "loc": { - "start": { - "line": 51, - "column": 7 - }, - "end": { - "line": 51, - "column": 11 - } - } - }, - "range": [ - 1174, - 1183 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "done", - "range": [ - 1186, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 14 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "range": [ - 1174, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "range": [ - 1174, - 1191 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 19 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1201, - 1205 - ], - "loc": { - "start": { - "line": 52, - "column": 9 - }, - "end": { - "line": 52, - "column": 13 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1194, - 1200 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 1194, - 1206 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 14 - } - } - }, - "range": [ - 1194, - 1207 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1210, - 1215 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1231, - 1235 - ], - "loc": { - "start": { - "line": 53, - "column": 23 - }, - "end": { - "line": 53, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1218, - 1223 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 1224, - 1230 - ], - "loc": { - "start": { - "line": 53, - "column": 16 - }, - "end": { - "line": 53, - "column": 22 - } - } - }, - "range": [ - 1218, - 1230 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1218, - 1236 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 28 - } - } - }, - "range": [ - 1210, - 1236 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 28 - } - } - }, - "range": [ - 1210, - 1237 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 29 - } - } - } - ], - "range": [ - 1170, - 1240 - ], - "loc": { - "start": { - "line": 50, - "column": 27 - }, - "end": { - "line": 54, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - } - ], - "range": [ - 1144, - 1240 - ], - "loc": { - "start": { - "line": 50, - "column": 1 - }, - "end": { - "line": 54, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1609, - 1613 - ], - "loc": { - "start": { - "line": 71, - "column": 42 - }, - "end": { - "line": 71, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 2018, - 2022 - ], - "loc": { - "start": { - "line": 87, - "column": 50 - }, - "end": { - "line": 87, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 166, - 175 - ], - "loc": { - "start": { - "line": 6, - "column": 25 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 102, - 111 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 547, - 550 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 609, - 612 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 679, - 682 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 739, - 742 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 798, - 801 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 860, - 863 - ], - "loc": { - "start": { - "line": 32, - "column": 8 - }, - "end": { - "line": 32, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1423, - 1428 - ], - "loc": { - "start": { - "line": 65, - "column": 9 - }, - "end": { - "line": 65, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1788, - 1793 - ], - "loc": { - "start": { - "line": 80, - "column": 9 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "d", - "identifiers": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "d", - "range": [ - 205, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 209, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "range": [ - 205, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 200, - 204 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 195, - 204 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 195, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - ], - "range": [ - 190, - 213 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 205, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 205, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 190, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "node": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 260, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 39 - } - } - }, - "range": [ - 252, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 39 - } - } - } - ], - "range": [ - 246, - 283 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 345, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 61 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 339, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 334, - 336 - ], - "loc": { - "start": { - "line": 11, - "column": 50 - }, - "end": { - "line": 11, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 311, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 27 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "range": [ - 305, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 325, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 41 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 293, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 70 - } - } - } - ], - "range": [ - 287, - 355 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 373, - 381 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 383, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - "range": [ - 373, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 392, - 398 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "range": [ - 392, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 414, - 417 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 453, - 463 - ], - "loc": { - "start": { - "line": 17, - "column": 27 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 464, - 484 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 424, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - ], - "range": [ - 419, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "range": [ - 414, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 367, - 497 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 360, - 498 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 20, - "column": 5 - } - } - } - ], - "range": [ - 241, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 233, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "range": [ - 226, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 21, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - } - ] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 233, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 233, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "node": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 260, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 39 - } - } - }, - "range": [ - 252, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 39 - } - } - } - ], - "range": [ - 246, - 283 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 345, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 61 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 339, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 334, - 336 - ], - "loc": { - "start": { - "line": 11, - "column": 50 - }, - "end": { - "line": 11, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 311, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 27 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "range": [ - 305, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 325, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 41 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 293, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 70 - } - } - } - ], - "range": [ - 287, - 355 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 373, - 381 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 383, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - "range": [ - 373, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 392, - 398 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "range": [ - 392, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 414, - 417 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 453, - 463 - ], - "loc": { - "start": { - "line": 17, - "column": 27 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 464, - 484 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 424, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - ], - "range": [ - 419, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "range": [ - 414, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 367, - 497 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 360, - 498 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 20, - "column": 5 - } - } - } - ], - "range": [ - 241, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 233, - 239 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "range": [ - 226, - 502 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 21, - "column": 3 - } - } - } - } - ], - "references": [] - }, - { - "name": "style", - "identifiers": [ - { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 260, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 39 - } - } - }, - "range": [ - 252, - 282 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 39 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - } - ] - }, - { - "name": "transform", - "identifiers": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 345, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 61 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 339, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 334, - 336 - ], - "loc": { - "start": { - "line": 11, - "column": 50 - }, - "end": { - "line": 11, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 311, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 27 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "range": [ - 305, - 320 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 325, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 41 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 331 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 47 - } - } - }, - "range": [ - 305, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 70 - } - } - }, - "range": [ - 293, - 354 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 70 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 34 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 305, - 310 - ], - "loc": { - "start": { - "line": 11, - "column": 21 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 339, - 344 - ], - "loc": { - "start": { - "line": 11, - "column": 55 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 252, - 257 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 453, - 463 - ], - "loc": { - "start": { - "line": 17, - "column": 27 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 464, - 484 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 424, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - ], - "range": [ - 419, - 492 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 463, - 464 - ], - "loc": { - "start": { - "line": 17, - "column": 37 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 484, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 18, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 444, - 453 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 293, - 302 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 18 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 400, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 59, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "input", - "identifiers": [ - { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 960, - 962 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 964, - 967 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 10 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 964, - 969 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "range": [ - 960, - 969 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 974, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 980, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 9 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - "range": [ - 974, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 990, - 1001 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1003, - 1008 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1009, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 22 - }, - "end": { - "line": 39, - "column": 27 - } - } - }, - "range": [ - 1003, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 27 - } - } - }, - "range": [ - 990, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 27 - } - } - } - ], - "range": [ - 955, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 40, - "column": 3 - } - } - }, - "range": [ - 948, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 40, - "column": 3 - } - } - } - ], - "range": [ - 942, - 1019 - ], - "loc": { - "start": { - "line": 36, - "column": 2 - }, - "end": { - "line": 40, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1023, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1032, - 1036 - ], - "loc": { - "start": { - "line": 42, - "column": 11 - }, - "end": { - "line": 42, - "column": 15 - } - } - }, - { - "type": "SpreadElement", - "argument": { - "type": "Identifier", - "name": "todos", - "range": [ - 1041, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 20 - }, - "end": { - "line": 42, - "column": 25 - } - } - }, - "range": [ - 1038, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 17 - }, - "end": { - "line": 42, - "column": 25 - } - } - } - ], - "range": [ - 1031, - 1047 - ], - "loc": { - "start": { - "line": 42, - "column": 10 - }, - "end": { - "line": 42, - "column": 26 - } - } - }, - "range": [ - 1023, - 1047 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 26 - } - } - }, - "range": [ - 1023, - 1048 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 27 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1051, - 1056 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1057, - 1062 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - }, - "range": [ - 1051, - 1062 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 1065, - 1067 - ], - "loc": { - "start": { - "line": 43, - "column": 16 - }, - "end": { - "line": 43, - "column": 18 - } - } - }, - "range": [ - 1051, - 1067 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 18 - } - } - }, - "range": [ - 1051, - 1068 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 19 - } - } - } - ], - "range": [ - 938, - 1071 - ], - "loc": { - "start": { - "line": 35, - "column": 21 - }, - "end": { - "line": 44, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - ], - "range": [ - 918, - 1071 - ], - "loc": { - "start": { - "line": 35, - "column": 1 - }, - "end": { - "line": 44, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 1003, - 1008 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 1051, - 1056 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - } - ] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 960, - 962 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 964, - 967 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 10 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 964, - 969 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "range": [ - 960, - 969 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 974, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 980, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 9 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - "range": [ - 974, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 990, - 1001 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1003, - 1008 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1009, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 22 - }, - "end": { - "line": 39, - "column": 27 - } - } - }, - "range": [ - 1003, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 27 - } - } - }, - "range": [ - 990, - 1014 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 27 - } - } - } - ], - "range": [ - 955, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 40, - "column": 3 - } - } - }, - "range": [ - 948, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 40, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1032, - 1036 - ], - "loc": { - "start": { - "line": 42, - "column": 11 - }, - "end": { - "line": 42, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 964, - 967 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 1003, - 1008 - ], - "loc": { - "start": { - "line": 39, - "column": 16 - }, - "end": { - "line": 39, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1023, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1032, - 1036 - ], - "loc": { - "start": { - "line": 42, - "column": 11 - }, - "end": { - "line": 42, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 948, - 952 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1041, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 20 - }, - "end": { - "line": 42, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 1051, - 1056 - ], - "loc": { - "start": { - "line": 43, - "column": 2 - }, - "end": { - "line": 43, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 931, - 936 - ], - "loc": { - "start": { - "line": 35, - "column": 14 - }, - "end": { - "line": 35, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 964, - 967 - ], - "loc": { - "start": { - "line": 37, - "column": 7 - }, - "end": { - "line": 37, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 514, - 517 - ], - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1023, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1041, - 1046 - ], - "loc": { - "start": { - "line": 42, - "column": 20 - }, - "end": { - "line": 42, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1100, - 1105 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 1126, - 1127 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 29 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "todo", - "range": [ - 1132, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 34 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "range": [ - 1126, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - } - ], - "range": [ - 1121, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1108, - 1113 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1114, - 1120 - ], - "loc": { - "start": { - "line": 47, - "column": 16 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "range": [ - 1108, - 1120 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1108, - 1137 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 39 - } - } - }, - "range": [ - 1100, - 1137 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 39 - } - } - }, - "range": [ - 1100, - 1138 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 40 - } - } - } - ], - "range": [ - 1096, - 1141 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 48, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - } - ], - "range": [ - 1074, - 1141 - ], - "loc": { - "start": { - "line": 46, - "column": 1 - }, - "end": { - "line": 48, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1132, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 34 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1100, - 1105 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1108, - 1113 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 1126, - 1127 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 29 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "todo", - "range": [ - 1132, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 34 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "range": [ - 1126, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - } - ], - "range": [ - 1121, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1126, - 1127 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1126, - 1127 - ], - "loc": { - "start": { - "line": 47, - "column": 28 - }, - "end": { - "line": 47, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1121, - 1122 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1132, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 34 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1132, - 1136 - ], - "loc": { - "start": { - "line": 47, - "column": 34 - }, - "end": { - "line": 47, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1090, - 1094 - ], - "loc": { - "start": { - "line": 46, - "column": 17 - }, - "end": { - "line": 46, - "column": 21 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1100, - 1105 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1108, - 1113 - ], - "loc": { - "start": { - "line": 47, - "column": 10 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1179, - 1183 - ], - "loc": { - "start": { - "line": 51, - "column": 7 - }, - "end": { - "line": 51, - "column": 11 - } - } - }, - "range": [ - 1174, - 1183 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "done", - "range": [ - 1186, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 14 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "range": [ - 1174, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "range": [ - 1174, - 1191 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 19 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1201, - 1205 - ], - "loc": { - "start": { - "line": 52, - "column": 9 - }, - "end": { - "line": 52, - "column": 13 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1194, - 1200 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 1194, - 1206 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 14 - } - } - }, - "range": [ - 1194, - 1207 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1210, - 1215 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1231, - 1235 - ], - "loc": { - "start": { - "line": 53, - "column": 23 - }, - "end": { - "line": 53, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1218, - 1223 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 1224, - 1230 - ], - "loc": { - "start": { - "line": 53, - "column": 16 - }, - "end": { - "line": 53, - "column": 22 - } - } - }, - "range": [ - 1218, - 1230 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1218, - 1236 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 28 - } - } - }, - "range": [ - 1210, - 1236 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 28 - } - } - }, - "range": [ - 1210, - 1237 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 29 - } - } - } - ], - "range": [ - 1170, - 1240 - ], - "loc": { - "start": { - "line": 50, - "column": 27 - }, - "end": { - "line": 54, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - } - ], - "range": [ - 1144, - 1240 - ], - "loc": { - "start": { - "line": 50, - "column": 1 - }, - "end": { - "line": 54, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1201, - 1205 - ], - "loc": { - "start": { - "line": 52, - "column": 9 - }, - "end": { - "line": 52, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1231, - 1235 - ], - "loc": { - "start": { - "line": 53, - "column": 23 - }, - "end": { - "line": 53, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - } - ] - }, - { - "name": "done", - "identifiers": [ - { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1179, - 1183 - ], - "loc": { - "start": { - "line": 51, - "column": 7 - }, - "end": { - "line": 51, - "column": 11 - } - } - }, - "range": [ - 1174, - 1183 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "done", - "range": [ - 1186, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 14 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "range": [ - 1174, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "range": [ - 1174, - 1191 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 19 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1201, - 1205 - ], - "loc": { - "start": { - "line": 52, - "column": 9 - }, - "end": { - "line": 52, - "column": 13 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1194, - 1200 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 1194, - 1206 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 14 - } - } - }, - "range": [ - 1194, - 1207 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1210, - 1215 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1231, - 1235 - ], - "loc": { - "start": { - "line": 53, - "column": 23 - }, - "end": { - "line": 53, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1218, - 1223 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 1224, - 1230 - ], - "loc": { - "start": { - "line": 53, - "column": 16 - }, - "end": { - "line": 53, - "column": 22 - } - } - }, - "range": [ - 1218, - 1230 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1218, - 1236 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 28 - } - } - }, - "range": [ - 1210, - 1236 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 28 - } - } - }, - "range": [ - 1210, - 1237 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 29 - } - } - } - ], - "range": [ - 1170, - 1240 - ], - "loc": { - "start": { - "line": 50, - "column": 27 - }, - "end": { - "line": 54, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - } - ], - "range": [ - 1144, - 1240 - ], - "loc": { - "start": { - "line": 50, - "column": 1 - }, - "end": { - "line": 54, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "done", - "range": [ - 1186, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 14 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1174, - 1178 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "done", - "range": [ - 1186, - 1190 - ], - "loc": { - "start": { - "line": 51, - "column": 14 - }, - "end": { - "line": 51, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "done", - "range": [ - 1164, - 1168 - ], - "loc": { - "start": { - "line": 50, - "column": 21 - }, - "end": { - "line": 50, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1194, - 1200 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1201, - 1205 - ], - "loc": { - "start": { - "line": 52, - "column": 9 - }, - "end": { - "line": 52, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1210, - 1215 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1218, - 1223 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1231, - 1235 - ], - "loc": { - "start": { - "line": 53, - "column": 23 - }, - "end": { - "line": 53, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1158, - 1162 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1194, - 1200 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1210, - 1215 - ], - "loc": { - "start": { - "line": 53, - "column": 2 - }, - "end": { - "line": 53, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1218, - 1223 - ], - "loc": { - "start": { - "line": 53, - "column": 10 - }, - "end": { - "line": 53, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 529, - 534 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 1338, - 1339 - ], - "loc": { - "start": { - "line": 60, - "column": 19 - }, - "end": { - "line": 60, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 1340, - 1343 - ], - "loc": { - "start": { - "line": 60, - "column": 21 - }, - "end": { - "line": 60, - "column": 24 - } - } - }, - "range": [ - 1338, - 1343 - ], - "loc": { - "start": { - "line": 60, - "column": 19 - }, - "end": { - "line": 60, - "column": 24 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'Enter'", - "value": "Enter", - "range": [ - 1348, - 1355 - ], - "loc": { - "start": { - "line": 60, - "column": 29 - }, - "end": { - "line": 60, - "column": 36 - } - } - }, - "range": [ - 1338, - 1355 - ], - "loc": { - "start": { - "line": 60, - "column": 19 - }, - "end": { - "line": 60, - "column": 36 - } - } - }, - "operator": "&&", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 1363, - 1364 - ], - "loc": { - "start": { - "line": 60, - "column": 44 - }, - "end": { - "line": 60, - "column": 45 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 1365, - 1371 - ], - "loc": { - "start": { - "line": 60, - "column": 46 - }, - "end": { - "line": 60, - "column": 52 - } - } - }, - "range": [ - 1363, - 1371 - ], - "loc": { - "start": { - "line": 60, - "column": 44 - }, - "end": { - "line": 60, - "column": 52 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "add", - "range": [ - 1359, - 1362 - ], - "loc": { - "start": { - "line": 60, - "column": 40 - }, - "end": { - "line": 60, - "column": 43 - } - } - }, - "optional": false, - "range": [ - 1359, - 1372 - ], - "loc": { - "start": { - "line": 60, - "column": 40 - }, - "end": { - "line": 60, - "column": 53 - } - } - }, - "range": [ - 1338, - 1372 - ], - "loc": { - "start": { - "line": 60, - "column": 19 - }, - "end": { - "line": 60, - "column": 53 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - } - ], - "range": [ - 1333, - 1372 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 53 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1338, - 1339 - ], - "loc": { - "start": { - "line": 60, - "column": 19 - }, - "end": { - "line": 60, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1363, - 1364 - ], - "loc": { - "start": { - "line": 60, - "column": 44 - }, - "end": { - "line": 60, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1338, - 1339 - ], - "loc": { - "start": { - "line": 60, - "column": 19 - }, - "end": { - "line": 60, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 1359, - 1362 - ], - "loc": { - "start": { - "line": 60, - "column": 40 - }, - "end": { - "line": 60, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1363, - 1364 - ], - "loc": { - "start": { - "line": 60, - "column": 44 - }, - "end": { - "line": 60, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1333, - 1334 - ], - "loc": { - "start": { - "line": 60, - "column": 14 - }, - "end": { - "line": 60, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 1359, - 1362 - ], - "loc": { - "start": { - "line": 60, - "column": 40 - }, - "end": { - "line": 60, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 927, - 930 - ], - "loc": { - "start": { - "line": 35, - "column": 10 - }, - "end": { - "line": 35, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1436, - 1437 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 1436, - 1437 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1442, - 1443 - ], - "loc": { - "start": { - "line": 65, - "column": 28 - }, - "end": { - "line": 65, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1444, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 30 - }, - "end": { - "line": 65, - "column": 34 - } - } - }, - "range": [ - 1442, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 28 - }, - "end": { - "line": 65, - "column": 34 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 1441, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 27 - }, - "end": { - "line": 65, - "column": 34 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1436, - 1437 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 23 - } - } - } - ], - "range": [ - 1436, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 34 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1442, - 1443 - ], - "loc": { - "start": { - "line": 65, - "column": 28 - }, - "end": { - "line": 65, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1436, - 1437 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1442, - 1443 - ], - "loc": { - "start": { - "line": 65, - "column": 28 - }, - "end": { - "line": 65, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1436, - 1437 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1442, - 1443 - ], - "loc": { - "start": { - "line": 65, - "column": 28 - }, - "end": { - "line": 65, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1444, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 30 - }, - "end": { - "line": 65, - "column": 34 - } - } - }, - "range": [ - 1442, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 28 - }, - "end": { - "line": 65, - "column": 34 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 1441, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 27 - }, - "end": { - "line": 65, - "column": 34 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1436, - 1437 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 23 - } - } - } - ], - "range": [ - 1436, - 1448 - ], - "loc": { - "start": { - "line": 65, - "column": 22 - }, - "end": { - "line": 65, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1423, - 1428 - ], - "loc": { - "start": { - "line": 65, - "column": 9 - }, - "end": { - "line": 65, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1429, - 1435 - ], - "loc": { - "start": { - "line": 65, - "column": 15 - }, - "end": { - "line": 65, - "column": 21 - } - } - }, - "range": [ - 1423, - 1435 - ], - "loc": { - "start": { - "line": 65, - "column": 9 - }, - "end": { - "line": 65, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 1423, - 1449 - ], - "loc": { - "start": { - "line": 65, - "column": 9 - }, - "end": { - "line": 65, - "column": 35 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - }, - "index": null, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1459, - 1463 - ], - "loc": { - "start": { - "line": 65, - "column": 45 - }, - "end": { - "line": 65, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1464, - 1466 - ], - "loc": { - "start": { - "line": 65, - "column": 50 - }, - "end": { - "line": 65, - "column": 52 - } - } - }, - "range": [ - 1459, - 1466 - ], - "loc": { - "start": { - "line": 65, - "column": 45 - }, - "end": { - "line": 65, - "column": 52 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "label", - "range": [ - 1473, - 1478 - ], - "loc": { - "start": { - "line": 66, - "column": 4 - }, - "end": { - "line": 66, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "receive", - "range": [ - 1486, - 1493 - ], - "loc": { - "start": { - "line": 67, - "column": 7 - }, - "end": { - "line": 67, - "column": 14 - } - } - }, - "modifiers": [], - "range": [ - 1483, - 1493 - ], - "loc": { - "start": { - "line": 67, - "column": 4 - }, - "end": { - "line": 67, - "column": 14 - } - } - }, - "intro": true, - "outro": false, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1497, - 1500 - ], - "loc": { - "start": { - "line": 67, - "column": 18 - }, - "end": { - "line": 67, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1502, - 1506 - ], - "loc": { - "start": { - "line": 67, - "column": 23 - }, - "end": { - "line": 67, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1507, - 1509 - ], - "loc": { - "start": { - "line": 67, - "column": 28 - }, - "end": { - "line": 67, - "column": 30 - } - } - }, - "range": [ - 1502, - 1509 - ], - "loc": { - "start": { - "line": 67, - "column": 23 - }, - "end": { - "line": 67, - "column": 30 - } - } - }, - "range": [ - 1497, - 1509 - ], - "loc": { - "start": { - "line": 67, - "column": 18 - }, - "end": { - "line": 67, - "column": 30 - } - } - } - ], - "range": [ - 1496, - 1510 - ], - "loc": { - "start": { - "line": 67, - "column": 17 - }, - "end": { - "line": 67, - "column": 31 - } - } - }, - "range": [ - 1483, - 1512 - ], - "loc": { - "start": { - "line": 67, - "column": 4 - }, - "end": { - "line": 67, - "column": 33 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "send", - "range": [ - 1521, - 1525 - ], - "loc": { - "start": { - "line": 68, - "column": 8 - }, - "end": { - "line": 68, - "column": 12 - } - } - }, - "modifiers": [], - "range": [ - 1517, - 1525 - ], - "loc": { - "start": { - "line": 68, - "column": 4 - }, - "end": { - "line": 68, - "column": 12 - } - } - }, - "intro": false, - "outro": true, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1529, - 1532 - ], - "loc": { - "start": { - "line": 68, - "column": 16 - }, - "end": { - "line": 68, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1534, - 1538 - ], - "loc": { - "start": { - "line": 68, - "column": 21 - }, - "end": { - "line": 68, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1539, - 1541 - ], - "loc": { - "start": { - "line": 68, - "column": 26 - }, - "end": { - "line": 68, - "column": 28 - } - } - }, - "range": [ - 1534, - 1541 - ], - "loc": { - "start": { - "line": 68, - "column": 21 - }, - "end": { - "line": 68, - "column": 28 - } - } - }, - "range": [ - 1529, - 1541 - ], - "loc": { - "start": { - "line": 68, - "column": 16 - }, - "end": { - "line": 68, - "column": 28 - } - } - } - ], - "range": [ - 1528, - 1542 - ], - "loc": { - "start": { - "line": 68, - "column": 15 - }, - "end": { - "line": 68, - "column": 29 - } - } - }, - "range": [ - 1517, - 1544 - ], - "loc": { - "start": { - "line": 68, - "column": 4 - }, - "end": { - "line": 68, - "column": 31 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 12 - }, - "end": { - "line": 69, - "column": 16 - } - } - }, - "modifiers": [], - "range": [ - 1549, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 4 - }, - "end": { - "line": 69, - "column": 16 - } - } - }, - "expression": null, - "range": [ - 1549, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 4 - }, - "end": { - "line": 69, - "column": 16 - } - } - } - ], - "selfClosing": false, - "range": [ - 1472, - 1566 - ], - "loc": { - "start": { - "line": 66, - "column": 3 - }, - "end": { - "line": 70, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1566, - 1571 - ], - "loc": { - "start": { - "line": 70, - "column": 4 - }, - "end": { - "line": 71, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 1572, - 1577 - ], - "loc": { - "start": { - "line": 71, - "column": 5 - }, - "end": { - "line": 71, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "type", - "range": [ - 1578, - 1582 - ], - "loc": { - "start": { - "line": 71, - "column": 11 - }, - "end": { - "line": 71, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "checkbox", - "range": [ - 1583, - 1591 - ], - "loc": { - "start": { - "line": 71, - "column": 16 - }, - "end": { - "line": 71, - "column": 24 - } - } - } - ], - "range": [ - 1578, - 1591 - ], - "loc": { - "start": { - "line": 71, - "column": 11 - }, - "end": { - "line": 71, - "column": 24 - } - } - }, - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "change", - "range": [ - 1595, - 1601 - ], - "loc": { - "start": { - "line": 71, - "column": 28 - }, - "end": { - "line": 71, - "column": 34 - } - } - }, - "modifiers": [], - "range": [ - 1592, - 1601 - ], - "loc": { - "start": { - "line": 71, - "column": 25 - }, - "end": { - "line": 71, - "column": 34 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1614, - 1618 - ], - "loc": { - "start": { - "line": 71, - "column": 47 - }, - "end": { - "line": 71, - "column": 51 - } - } - }, - { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 1620, - 1624 - ], - "loc": { - "start": { - "line": 71, - "column": 53 - }, - "end": { - "line": 71, - "column": 57 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "mark", - "range": [ - 1609, - 1613 - ], - "loc": { - "start": { - "line": 71, - "column": 42 - }, - "end": { - "line": 71, - "column": 46 - } - } - }, - "optional": false, - "range": [ - 1609, - 1625 - ], - "loc": { - "start": { - "line": 71, - "column": 42 - }, - "end": { - "line": 71, - "column": 58 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 1603, - 1625 - ], - "loc": { - "start": { - "line": 71, - "column": 36 - }, - "end": { - "line": 71, - "column": 58 - } - } - }, - "range": [ - 1592, - 1626 - ], - "loc": { - "start": { - "line": 71, - "column": 25 - }, - "end": { - "line": 71, - "column": 59 - } - } - } - ], - "selfClosing": false, - "range": [ - 1571, - 1627 - ], - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 71, - "column": 60 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 1571, - 1627 - ], - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 71, - "column": 60 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1627, - 1632 - ], - "loc": { - "start": { - "line": 71, - "column": 60 - }, - "end": { - "line": 72, - "column": 4 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1633, - 1637 - ], - "loc": { - "start": { - "line": 72, - "column": 5 - }, - "end": { - "line": 72, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "description", - "range": [ - 1638, - 1649 - ], - "loc": { - "start": { - "line": 72, - "column": 10 - }, - "end": { - "line": 72, - "column": 21 - } - } - }, - "range": [ - 1633, - 1649 - ], - "loc": { - "start": { - "line": 72, - "column": 5 - }, - "end": { - "line": 72, - "column": 21 - } - } - }, - "range": [ - 1632, - 1650 - ], - "loc": { - "start": { - "line": 72, - "column": 4 - }, - "end": { - "line": 72, - "column": 22 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1650, - 1655 - ], - "loc": { - "start": { - "line": 72, - "column": 22 - }, - "end": { - "line": 73, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "button", - "range": [ - 1656, - 1662 - ], - "loc": { - "start": { - "line": 73, - "column": 5 - }, - "end": { - "line": 73, - "column": 11 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "click", - "range": [ - 1666, - 1671 - ], - "loc": { - "start": { - "line": 73, - "column": 15 - }, - "end": { - "line": 73, - "column": 20 - } - } - }, - "modifiers": [], - "range": [ - 1663, - 1671 - ], - "loc": { - "start": { - "line": 73, - "column": 12 - }, - "end": { - "line": 73, - "column": 20 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1687, - 1691 - ], - "loc": { - "start": { - "line": 73, - "column": 36 - }, - "end": { - "line": 73, - "column": 40 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1680, - 1686 - ], - "loc": { - "start": { - "line": 73, - "column": 29 - }, - "end": { - "line": 73, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 1680, - 1692 - ], - "loc": { - "start": { - "line": 73, - "column": 29 - }, - "end": { - "line": 73, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 1674, - 1692 - ], - "loc": { - "start": { - "line": 73, - "column": 23 - }, - "end": { - "line": 73, - "column": 41 - } - } - }, - "range": [ - 1663, - 1694 - ], - "loc": { - "start": { - "line": 73, - "column": 12 - }, - "end": { - "line": 73, - "column": 43 - } - } - } - ], - "selfClosing": false, - "range": [ - 1655, - 1695 - ], - "loc": { - "start": { - "line": 73, - "column": 4 - }, - "end": { - "line": 73, - "column": 44 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "remove", - "range": [ - 1695, - 1701 - ], - "loc": { - "start": { - "line": 73, - "column": 44 - }, - "end": { - "line": 73, - "column": 50 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1701, - 1710 - ], - "loc": { - "start": { - "line": 73, - "column": 50 - }, - "end": { - "line": 73, - "column": 59 - } - } - }, - "range": [ - 1655, - 1710 - ], - "loc": { - "start": { - "line": 73, - "column": 4 - }, - "end": { - "line": 73, - "column": 59 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 1710, - 1714 - ], - "loc": { - "start": { - "line": 73, - "column": 59 - }, - "end": { - "line": 74, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1714, - 1722 - ], - "loc": { - "start": { - "line": 74, - "column": 3 - }, - "end": { - "line": 74, - "column": 11 - } - } - }, - "range": [ - 1472, - 1722 - ], - "loc": { - "start": { - "line": 66, - "column": 3 - }, - "end": { - "line": 74, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 1416, - 1732 - ], - "loc": { - "start": { - "line": 65, - "column": 2 - }, - "end": { - "line": 75, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1459, - 1463 - ], - "loc": { - "start": { - "line": 65, - "column": 45 - }, - "end": { - "line": 65, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1502, - 1506 - ], - "loc": { - "start": { - "line": 67, - "column": 23 - }, - "end": { - "line": 67, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1534, - 1538 - ], - "loc": { - "start": { - "line": 68, - "column": 21 - }, - "end": { - "line": 68, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1614, - 1618 - ], - "loc": { - "start": { - "line": 71, - "column": 47 - }, - "end": { - "line": 71, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1633, - 1637 - ], - "loc": { - "start": { - "line": 72, - "column": 5 - }, - "end": { - "line": 72, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1687, - 1691 - ], - "loc": { - "start": { - "line": 73, - "column": 36 - }, - "end": { - "line": 73, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1459, - 1463 - ], - "loc": { - "start": { - "line": 65, - "column": 45 - }, - "end": { - "line": 65, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1502, - 1506 - ], - "loc": { - "start": { - "line": 67, - "column": 23 - }, - "end": { - "line": 67, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1486, - 1493 - ], - "loc": { - "start": { - "line": 67, - "column": 7 - }, - "end": { - "line": 67, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1534, - 1538 - ], - "loc": { - "start": { - "line": 68, - "column": 21 - }, - "end": { - "line": 68, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1521, - 1525 - ], - "loc": { - "start": { - "line": 68, - "column": 8 - }, - "end": { - "line": 68, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 12 - }, - "end": { - "line": 69, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1633, - 1637 - ], - "loc": { - "start": { - "line": 72, - "column": 5 - }, - "end": { - "line": 72, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1609, - 1613 - ], - "loc": { - "start": { - "line": 71, - "column": 42 - }, - "end": { - "line": 71, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1614, - 1618 - ], - "loc": { - "start": { - "line": 71, - "column": 47 - }, - "end": { - "line": 71, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1609, - 1613 - ], - "loc": { - "start": { - "line": 71, - "column": 42 - }, - "end": { - "line": 71, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1614, - 1618 - ], - "loc": { - "start": { - "line": 71, - "column": 47 - }, - "end": { - "line": 71, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1680, - 1686 - ], - "loc": { - "start": { - "line": 73, - "column": 29 - }, - "end": { - "line": 73, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1687, - 1691 - ], - "loc": { - "start": { - "line": 73, - "column": 36 - }, - "end": { - "line": 73, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1680, - 1686 - ], - "loc": { - "start": { - "line": 73, - "column": 29 - }, - "end": { - "line": 73, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1687, - 1691 - ], - "loc": { - "start": { - "line": 73, - "column": 36 - }, - "end": { - "line": 73, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1453, - 1457 - ], - "loc": { - "start": { - "line": 65, - "column": 39 - }, - "end": { - "line": 65, - "column": 43 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1486, - 1493 - ], - "loc": { - "start": { - "line": 67, - "column": 7 - }, - "end": { - "line": 67, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1521, - 1525 - ], - "loc": { - "start": { - "line": 68, - "column": 8 - }, - "end": { - "line": 68, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 12 - }, - "end": { - "line": 69, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1609, - 1613 - ], - "loc": { - "start": { - "line": 71, - "column": 42 - }, - "end": { - "line": 71, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1680, - 1686 - ], - "loc": { - "start": { - "line": 73, - "column": 29 - }, - "end": { - "line": 73, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1801, - 1802 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 1801, - 1802 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1806, - 1807 - ], - "loc": { - "start": { - "line": 80, - "column": 27 - }, - "end": { - "line": 80, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1808, - 1812 - ], - "loc": { - "start": { - "line": 80, - "column": 29 - }, - "end": { - "line": 80, - "column": 33 - } - } - }, - "range": [ - 1806, - 1812 - ], - "loc": { - "start": { - "line": 80, - "column": 27 - }, - "end": { - "line": 80, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1801, - 1802 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 23 - } - } - } - ], - "range": [ - 1801, - 1812 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1806, - 1807 - ], - "loc": { - "start": { - "line": 80, - "column": 27 - }, - "end": { - "line": 80, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1801, - 1802 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1806, - 1807 - ], - "loc": { - "start": { - "line": 80, - "column": 27 - }, - "end": { - "line": 80, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1801, - 1802 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1806, - 1807 - ], - "loc": { - "start": { - "line": 80, - "column": 27 - }, - "end": { - "line": 80, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1808, - 1812 - ], - "loc": { - "start": { - "line": 80, - "column": 29 - }, - "end": { - "line": 80, - "column": 33 - } - } - }, - "range": [ - 1806, - 1812 - ], - "loc": { - "start": { - "line": 80, - "column": 27 - }, - "end": { - "line": 80, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1801, - 1802 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 23 - } - } - } - ], - "range": [ - 1801, - 1812 - ], - "loc": { - "start": { - "line": 80, - "column": 22 - }, - "end": { - "line": 80, - "column": 33 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1788, - 1793 - ], - "loc": { - "start": { - "line": 80, - "column": 9 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1794, - 1800 - ], - "loc": { - "start": { - "line": 80, - "column": 15 - }, - "end": { - "line": 80, - "column": 21 - } - } - }, - "range": [ - 1788, - 1800 - ], - "loc": { - "start": { - "line": 80, - "column": 9 - }, - "end": { - "line": 80, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 1788, - 1813 - ], - "loc": { - "start": { - "line": 80, - "column": 9 - }, - "end": { - "line": 80, - "column": 34 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - }, - "index": null, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1823, - 1827 - ], - "loc": { - "start": { - "line": 80, - "column": 44 - }, - "end": { - "line": 80, - "column": 48 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1828, - 1830 - ], - "loc": { - "start": { - "line": 80, - "column": 49 - }, - "end": { - "line": 80, - "column": 51 - } - } - }, - "range": [ - 1823, - 1830 - ], - "loc": { - "start": { - "line": 80, - "column": 44 - }, - "end": { - "line": 80, - "column": 51 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "label", - "range": [ - 1837, - 1842 - ], - "loc": { - "start": { - "line": 81, - "column": 4 - }, - "end": { - "line": 81, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 1847, - 1852 - ], - "loc": { - "start": { - "line": 82, - "column": 4 - }, - "end": { - "line": 82, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "done", - "range": [ - 1854, - 1858 - ], - "loc": { - "start": { - "line": 82, - "column": 11 - }, - "end": { - "line": 82, - "column": 15 - } - } - } - ], - "range": [ - 1847, - 1859 - ], - "loc": { - "start": { - "line": 82, - "column": 4 - }, - "end": { - "line": 82, - "column": 16 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "receive", - "range": [ - 1867, - 1874 - ], - "loc": { - "start": { - "line": 83, - "column": 7 - }, - "end": { - "line": 83, - "column": 14 - } - } - }, - "modifiers": [], - "range": [ - 1864, - 1874 - ], - "loc": { - "start": { - "line": 83, - "column": 4 - }, - "end": { - "line": 83, - "column": 14 - } - } - }, - "intro": true, - "outro": false, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1878, - 1881 - ], - "loc": { - "start": { - "line": 83, - "column": 18 - }, - "end": { - "line": 83, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1883, - 1887 - ], - "loc": { - "start": { - "line": 83, - "column": 23 - }, - "end": { - "line": 83, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1888, - 1890 - ], - "loc": { - "start": { - "line": 83, - "column": 28 - }, - "end": { - "line": 83, - "column": 30 - } - } - }, - "range": [ - 1883, - 1890 - ], - "loc": { - "start": { - "line": 83, - "column": 23 - }, - "end": { - "line": 83, - "column": 30 - } - } - }, - "range": [ - 1878, - 1890 - ], - "loc": { - "start": { - "line": 83, - "column": 18 - }, - "end": { - "line": 83, - "column": 30 - } - } - } - ], - "range": [ - 1877, - 1891 - ], - "loc": { - "start": { - "line": 83, - "column": 17 - }, - "end": { - "line": 83, - "column": 31 - } - } - }, - "range": [ - 1864, - 1893 - ], - "loc": { - "start": { - "line": 83, - "column": 4 - }, - "end": { - "line": 83, - "column": 33 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "send", - "range": [ - 1902, - 1906 - ], - "loc": { - "start": { - "line": 84, - "column": 8 - }, - "end": { - "line": 84, - "column": 12 - } - } - }, - "modifiers": [], - "range": [ - 1898, - 1906 - ], - "loc": { - "start": { - "line": 84, - "column": 4 - }, - "end": { - "line": 84, - "column": 12 - } - } - }, - "intro": false, - "outro": true, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1910, - 1913 - ], - "loc": { - "start": { - "line": 84, - "column": 16 - }, - "end": { - "line": 84, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1915, - 1919 - ], - "loc": { - "start": { - "line": 84, - "column": 21 - }, - "end": { - "line": 84, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1920, - 1922 - ], - "loc": { - "start": { - "line": 84, - "column": 26 - }, - "end": { - "line": 84, - "column": 28 - } - } - }, - "range": [ - 1915, - 1922 - ], - "loc": { - "start": { - "line": 84, - "column": 21 - }, - "end": { - "line": 84, - "column": 28 - } - } - }, - "range": [ - 1910, - 1922 - ], - "loc": { - "start": { - "line": 84, - "column": 16 - }, - "end": { - "line": 84, - "column": 28 - } - } - } - ], - "range": [ - 1909, - 1923 - ], - "loc": { - "start": { - "line": 84, - "column": 15 - }, - "end": { - "line": 84, - "column": 29 - } - } - }, - "range": [ - 1898, - 1925 - ], - "loc": { - "start": { - "line": 84, - "column": 4 - }, - "end": { - "line": 84, - "column": 31 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Animation", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "flip", - "range": [ - 1938, - 1942 - ], - "loc": { - "start": { - "line": 85, - "column": 12 - }, - "end": { - "line": 85, - "column": 16 - } - } - }, - "modifiers": [], - "range": [ - 1930, - 1942 - ], - "loc": { - "start": { - "line": 85, - "column": 4 - }, - "end": { - "line": 85, - "column": 16 - } - } - }, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 1946, - 1954 - ], - "loc": { - "start": { - "line": 85, - "column": 20 - }, - "end": { - "line": 85, - "column": 28 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 1956, - 1959 - ], - "loc": { - "start": { - "line": 85, - "column": 30 - }, - "end": { - "line": 85, - "column": 33 - } - } - }, - "range": [ - 1946, - 1959 - ], - "loc": { - "start": { - "line": 85, - "column": 20 - }, - "end": { - "line": 85, - "column": 33 - } - } - } - ], - "range": [ - 1945, - 1960 - ], - "loc": { - "start": { - "line": 85, - "column": 19 - }, - "end": { - "line": 85, - "column": 34 - } - } - }, - "range": [ - 1930, - 1962 - ], - "loc": { - "start": { - "line": 85, - "column": 4 - }, - "end": { - "line": 85, - "column": 36 - } - } - } - ], - "selfClosing": false, - "range": [ - 1836, - 1967 - ], - "loc": { - "start": { - "line": 81, - "column": 3 - }, - "end": { - "line": 86, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1967, - 1972 - ], - "loc": { - "start": { - "line": 86, - "column": 4 - }, - "end": { - "line": 87, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 1973, - 1978 - ], - "loc": { - "start": { - "line": 87, - "column": 5 - }, - "end": { - "line": 87, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "type", - "range": [ - 1979, - 1983 - ], - "loc": { - "start": { - "line": 87, - "column": 11 - }, - "end": { - "line": 87, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "checkbox", - "range": [ - 1984, - 1992 - ], - "loc": { - "start": { - "line": 87, - "column": 16 - }, - "end": { - "line": 87, - "column": 24 - } - } - } - ], - "range": [ - 1979, - 1992 - ], - "loc": { - "start": { - "line": 87, - "column": 11 - }, - "end": { - "line": 87, - "column": 24 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "checked", - "range": [ - 1993, - 2000 - ], - "loc": { - "start": { - "line": 87, - "column": 25 - }, - "end": { - "line": 87, - "column": 32 - } - } - }, - "boolean": true, - "value": [], - "range": [ - 1993, - 2000 - ], - "loc": { - "start": { - "line": 87, - "column": 25 - }, - "end": { - "line": 87, - "column": 32 - } - } - }, - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "change", - "range": [ - 2004, - 2010 - ], - "loc": { - "start": { - "line": 87, - "column": 36 - }, - "end": { - "line": 87, - "column": 42 - } - } - }, - "modifiers": [], - "range": [ - 2001, - 2010 - ], - "loc": { - "start": { - "line": 87, - "column": 33 - }, - "end": { - "line": 87, - "column": 42 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 2023, - 2027 - ], - "loc": { - "start": { - "line": 87, - "column": 55 - }, - "end": { - "line": 87, - "column": 59 - } - } - }, - { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 2029, - 2034 - ], - "loc": { - "start": { - "line": 87, - "column": 61 - }, - "end": { - "line": 87, - "column": 66 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "mark", - "range": [ - 2018, - 2022 - ], - "loc": { - "start": { - "line": 87, - "column": 50 - }, - "end": { - "line": 87, - "column": 54 - } - } - }, - "optional": false, - "range": [ - 2018, - 2035 - ], - "loc": { - "start": { - "line": 87, - "column": 50 - }, - "end": { - "line": 87, - "column": 67 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 2012, - 2035 - ], - "loc": { - "start": { - "line": 87, - "column": 44 - }, - "end": { - "line": 87, - "column": 67 - } - } - }, - "range": [ - 2001, - 2036 - ], - "loc": { - "start": { - "line": 87, - "column": 33 - }, - "end": { - "line": 87, - "column": 68 - } - } - } - ], - "selfClosing": false, - "range": [ - 1972, - 2037 - ], - "loc": { - "start": { - "line": 87, - "column": 4 - }, - "end": { - "line": 87, - "column": 69 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 1972, - 2037 - ], - "loc": { - "start": { - "line": 87, - "column": 4 - }, - "end": { - "line": 87, - "column": 69 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 2037, - 2042 - ], - "loc": { - "start": { - "line": 87, - "column": 69 - }, - "end": { - "line": 88, - "column": 4 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 2043, - 2047 - ], - "loc": { - "start": { - "line": 88, - "column": 5 - }, - "end": { - "line": 88, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "description", - "range": [ - 2048, - 2059 - ], - "loc": { - "start": { - "line": 88, - "column": 10 - }, - "end": { - "line": 88, - "column": 21 - } - } - }, - "range": [ - 2043, - 2059 - ], - "loc": { - "start": { - "line": 88, - "column": 5 - }, - "end": { - "line": 88, - "column": 21 - } - } - }, - "range": [ - 2042, - 2060 - ], - "loc": { - "start": { - "line": 88, - "column": 4 - }, - "end": { - "line": 88, - "column": 22 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 2060, - 2065 - ], - "loc": { - "start": { - "line": 88, - "column": 22 - }, - "end": { - "line": 89, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "button", - "range": [ - 2066, - 2072 - ], - "loc": { - "start": { - "line": 89, - "column": 5 - }, - "end": { - "line": 89, - "column": 11 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "click", - "range": [ - 2076, - 2081 - ], - "loc": { - "start": { - "line": 89, - "column": 15 - }, - "end": { - "line": 89, - "column": 20 - } - } - }, - "modifiers": [], - "range": [ - 2073, - 2081 - ], - "loc": { - "start": { - "line": 89, - "column": 12 - }, - "end": { - "line": 89, - "column": 20 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 2097, - 2101 - ], - "loc": { - "start": { - "line": 89, - "column": 36 - }, - "end": { - "line": 89, - "column": 40 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 2090, - 2096 - ], - "loc": { - "start": { - "line": 89, - "column": 29 - }, - "end": { - "line": 89, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 2090, - 2102 - ], - "loc": { - "start": { - "line": 89, - "column": 29 - }, - "end": { - "line": 89, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 2084, - 2102 - ], - "loc": { - "start": { - "line": 89, - "column": 23 - }, - "end": { - "line": 89, - "column": 41 - } - } - }, - "range": [ - 2073, - 2104 - ], - "loc": { - "start": { - "line": 89, - "column": 12 - }, - "end": { - "line": 89, - "column": 43 - } - } - } - ], - "selfClosing": false, - "range": [ - 2065, - 2105 - ], - "loc": { - "start": { - "line": 89, - "column": 4 - }, - "end": { - "line": 89, - "column": 44 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "remove", - "range": [ - 2105, - 2111 - ], - "loc": { - "start": { - "line": 89, - "column": 44 - }, - "end": { - "line": 89, - "column": 50 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 2111, - 2120 - ], - "loc": { - "start": { - "line": 89, - "column": 50 - }, - "end": { - "line": 89, - "column": 59 - } - } - }, - "range": [ - 2065, - 2120 - ], - "loc": { - "start": { - "line": 89, - "column": 4 - }, - "end": { - "line": 89, - "column": 59 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 2120, - 2124 - ], - "loc": { - "start": { - "line": 89, - "column": 59 - }, - "end": { - "line": 90, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 2124, - 2132 - ], - "loc": { - "start": { - "line": 90, - "column": 3 - }, - "end": { - "line": 90, - "column": 11 - } - } - }, - "range": [ - 1836, - 2132 - ], - "loc": { - "start": { - "line": 81, - "column": 3 - }, - "end": { - "line": 90, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 1781, - 2142 - ], - "loc": { - "start": { - "line": 80, - "column": 2 - }, - "end": { - "line": 91, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1823, - 1827 - ], - "loc": { - "start": { - "line": 80, - "column": 44 - }, - "end": { - "line": 80, - "column": 48 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1883, - 1887 - ], - "loc": { - "start": { - "line": 83, - "column": 23 - }, - "end": { - "line": 83, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1915, - 1919 - ], - "loc": { - "start": { - "line": 84, - "column": 21 - }, - "end": { - "line": 84, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2023, - 2027 - ], - "loc": { - "start": { - "line": 87, - "column": 55 - }, - "end": { - "line": 87, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2043, - 2047 - ], - "loc": { - "start": { - "line": 88, - "column": 5 - }, - "end": { - "line": 88, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2097, - 2101 - ], - "loc": { - "start": { - "line": 89, - "column": 36 - }, - "end": { - "line": 89, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1823, - 1827 - ], - "loc": { - "start": { - "line": 80, - "column": 44 - }, - "end": { - "line": 80, - "column": 48 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1883, - 1887 - ], - "loc": { - "start": { - "line": 83, - "column": 23 - }, - "end": { - "line": 83, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1867, - 1874 - ], - "loc": { - "start": { - "line": 83, - "column": 7 - }, - "end": { - "line": 83, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1915, - 1919 - ], - "loc": { - "start": { - "line": 84, - "column": 21 - }, - "end": { - "line": 84, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1902, - 1906 - ], - "loc": { - "start": { - "line": 84, - "column": 8 - }, - "end": { - "line": 84, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 1938, - 1942 - ], - "loc": { - "start": { - "line": 85, - "column": 12 - }, - "end": { - "line": 85, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2043, - 2047 - ], - "loc": { - "start": { - "line": 88, - "column": 5 - }, - "end": { - "line": 88, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 2018, - 2022 - ], - "loc": { - "start": { - "line": 87, - "column": 50 - }, - "end": { - "line": 87, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2023, - 2027 - ], - "loc": { - "start": { - "line": 87, - "column": 55 - }, - "end": { - "line": 87, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 2018, - 2022 - ], - "loc": { - "start": { - "line": 87, - "column": 50 - }, - "end": { - "line": 87, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2023, - 2027 - ], - "loc": { - "start": { - "line": 87, - "column": 55 - }, - "end": { - "line": 87, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 2090, - 2096 - ], - "loc": { - "start": { - "line": 89, - "column": 29 - }, - "end": { - "line": 89, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2097, - 2101 - ], - "loc": { - "start": { - "line": 89, - "column": 36 - }, - "end": { - "line": 89, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 2090, - 2096 - ], - "loc": { - "start": { - "line": 89, - "column": 29 - }, - "end": { - "line": 89, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 2097, - 2101 - ], - "loc": { - "start": { - "line": 89, - "column": 36 - }, - "end": { - "line": 89, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1817, - 1821 - ], - "loc": { - "start": { - "line": 80, - "column": 38 - }, - "end": { - "line": 80, - "column": 42 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1867, - 1874 - ], - "loc": { - "start": { - "line": 83, - "column": 7 - }, - "end": { - "line": 83, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 155, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1902, - 1906 - ], - "loc": { - "start": { - "line": 84, - "column": 8 - }, - "end": { - "line": 84, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 149, - 153 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flip", - "range": [ - 1938, - 1942 - ], - "loc": { - "start": { - "line": 85, - "column": 12 - }, - "end": { - "line": 85, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flip", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 2018, - 2022 - ], - "loc": { - "start": { - "line": 87, - "column": 50 - }, - "end": { - "line": 87, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1153, - 1157 - ], - "loc": { - "start": { - "line": 50, - "column": 10 - }, - "end": { - "line": 50, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 2090, - 2096 - ], - "loc": { - "start": { - "line": 89, - "column": 29 - }, - "end": { - "line": 89, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1083, - 1089 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 16 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 195, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 260, - 276 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json index b50b49b9..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1872 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onDestroy", - "identifiers": [ - { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "local": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 322, - 331 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 266, - 271 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 375, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - } - ] - }, - { - "name": "Incrementer", - "identifiers": [ - { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 92, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 92, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 92, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "range": [ - 92, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 390, - 401 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 92, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "Decrementer", - "identifiers": [ - { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 141, - 152 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 141, - 152 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 141, - 152 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 141, - 152 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 405, - 416 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 141, - 152 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ] - }, - { - "name": "Resetter", - "identifiers": [ - { - "type": "Identifier", - "name": "Resetter", - "range": [ - 190, - 198 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 190, - 198 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 190, - 198 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "range": [ - 190, - 198 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 420, - 428 - ], - "loc": { - "start": { - "line": 20, - "column": 1 - }, - "end": { - "line": 20, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 190, - 198 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ] - }, - { - "name": "count_value", - "identifiers": [ - { - "type": "Identifier", - "name": "count_value", - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count_value", - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count_value", - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "init": null, - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 295, - 306 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - } - ] - }, - { - "name": "unsubscribe", - "identifiers": [ - { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count_value", - "range": [ - 295, - 306 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "value", - "range": [ - 309, - 314 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "range": [ - 295, - 315 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 22 - } - } - } - ], - "range": [ - 291, - 318 - ], - "loc": { - "start": { - "line": 10, - "column": 46 - }, - "end": { - "line": 12, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 282, - 287 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 10, - "column": 42 - } - } - } - ], - "range": [ - 282, - 318 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 12, - "column": 2 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "count", - "range": [ - 266, - 271 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "subscribe", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "range": [ - 266, - 281 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "optional": false, - "range": [ - 266, - 319 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "range": [ - 252, - 319 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 12, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 332, - 343 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 266, - 271 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 322, - 331 - ], - "loc": { - "start": { - "line": 13, - "column": 1 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 332, - 343 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 252, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 375, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 56, - 61 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 390, - 401 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 92, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 405, - 416 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 141, - 152 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 420, - 428 - ], - "loc": { - "start": { - "line": 20, - "column": 1 - }, - "end": { - "line": 20, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 190, - 198 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 282, - 287 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 10, - "column": 42 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 282, - 287 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 10, - "column": 42 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count_value", - "range": [ - 295, - 306 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "value", - "range": [ - 309, - 314 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "range": [ - 295, - 315 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 22 - } - } - } - ], - "range": [ - 291, - 318 - ], - "loc": { - "start": { - "line": 10, - "column": 46 - }, - "end": { - "line": 12, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 282, - 287 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 10, - "column": 42 - } - } - } - ], - "range": [ - 282, - 318 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 12, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 309, - 314 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 282, - 287 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 10, - "column": 42 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 295, - 306 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 309, - 314 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 282, - 287 - ], - "loc": { - "start": { - "line": 10, - "column": 37 - }, - "end": { - "line": 10, - "column": 42 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 295, - 306 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 231, - 242 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json index 3b06752b..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,5199 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "getRandomNumber", - "identifiers": [ - { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": true, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "init": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "tutorial/random-number", - "raw": "tutorial/random-number" - }, - "range": [ - 71, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 50 - } - } - } - ], - "range": [ - 71, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 50 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "fetch", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 65, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 51 - } - } - }, - "range": [ - 59, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 51 - } - } - }, - "range": [ - 53, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 51 - } - } - } - ], - "range": [ - 47, - 97 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 52 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "init": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "res", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 123, - 127 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "range": [ - 119, - 127 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 119, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "range": [ - 113, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "range": [ - 106, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 100, - 130 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 32 - } - } - }, - { - "type": "IfStatement", - "alternate": { - "type": "BlockStatement", - "body": [ - { - "type": "ThrowStatement", - "argument": { - "type": "NewExpression", - "arguments": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 194, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Error", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "range": [ - 184, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "range": [ - 178, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 25 - } - } - } - ], - "range": [ - 173, - 204 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 10, - "column": 3 - } - } - }, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "Identifier", - "name": "text", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "range": [ - 151, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 15 - } - } - } - ], - "range": [ - 146, - 167 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 8, - "column": 3 - } - } - }, - "test": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "res", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "ok", - "range": [ - 142, - 144 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 138, - 144 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 134, - 204 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 10, - "column": 3 - } - } - } - ], - "range": [ - 43, - 207 - ], - "loc": { - "start": { - "line": 2, - "column": 34 - }, - "end": { - "line": 11, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "params": [], - "range": [ - 10, - 207 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 11, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 224, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 282, - 297 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "name": "promise", - "identifiers": [ - { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 224, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "optional": false, - "range": [ - 224, - 241 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "range": [ - 214, - 241 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 272, - 279 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 420, - 427 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 570, - 577 - ], - "loc": { - "start": { - "line": 33, - "column": 8 - }, - "end": { - "line": 33, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 637, - 644 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 719, - 726 - ], - "loc": { - "start": { - "line": 41, - "column": 8 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 254, - 265 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 254, - 265 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "promise", - "range": [ - 272, - 279 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 282, - 297 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "optional": false, - "range": [ - 282, - 299 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "range": [ - 272, - 299 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 29 - } - } - }, - "range": [ - 272, - 300 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 30 - } - } - } - ], - "range": [ - 268, - 303 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 17, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 254, - 265 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "params": [], - "range": [ - 245, - 303 - ], - "loc": { - "start": { - "line": 15, - "column": 1 - }, - "end": { - "line": 17, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 333, - 344 - ], - "loc": { - "start": { - "line": 20, - "column": 18 - }, - "end": { - "line": 20, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 254, - 265 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 224, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 333, - 344 - ], - "loc": { - "start": { - "line": 20, - "column": 18 - }, - "end": { - "line": 20, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 254, - 265 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 15, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 420, - 427 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 570, - 577 - ], - "loc": { - "start": { - "line": 33, - "column": 8 - }, - "end": { - "line": 33, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 637, - 644 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 719, - 726 - ], - "loc": { - "start": { - "line": 41, - "column": 8 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "res", - "identifiers": [ - { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "init": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "tutorial/random-number", - "raw": "tutorial/random-number" - }, - "range": [ - 71, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 50 - } - } - } - ], - "range": [ - 71, - 95 - ], - "loc": { - "start": { - "line": 3, - "column": 26 - }, - "end": { - "line": 3, - "column": 50 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "fetch", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 65, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 51 - } - } - }, - "range": [ - 59, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 51 - } - } - }, - "range": [ - 53, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 51 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - } - ] - }, - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "init": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "res", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 123, - 127 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "range": [ - 119, - 127 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 119, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "range": [ - 113, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "range": [ - 106, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 194, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 119, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 158, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 194, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 194, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 106, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 272, - 279 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 282, - 297 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "promise", - "range": [ - 272, - 279 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "promise", - "range": [ - 214, - 221 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 282, - 297 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getRandomNumber", - "range": [ - 25, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "number", - "identifiers": [ - { - "type": "Identifier", - "name": "number", - "range": [ - 455, - 461 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "number", - "range": [ - 455, - 461 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": false, - "value": { - "type": "Identifier", - "name": "number", - "range": [ - 455, - 461 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 462, - 464 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 28, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 465, - 466 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 464, - 467 - ], - "loc": { - "start": { - "line": 28, - "column": 1 - }, - "end": { - "line": 28, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "The number is ", - "range": [ - 467, - 481 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "number", - "range": [ - 482, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "range": [ - 481, - 489 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 489, - 493 - ], - "loc": { - "start": { - "line": 28, - "column": 26 - }, - "end": { - "line": 28, - "column": 30 - } - } - }, - "range": [ - 464, - 493 - ], - "loc": { - "start": { - "line": 28, - "column": 1 - }, - "end": { - "line": 28, - "column": 30 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 493, - 494 - ], - "loc": { - "start": { - "line": 28, - "column": 30 - }, - "end": { - "line": 29, - "column": 0 - } - } - } - ], - "range": [ - 448, - 494 - ], - "loc": { - "start": { - "line": 27, - "column": 0 - }, - "end": { - "line": 29, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 482, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 455, - 461 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "number", - "range": [ - 482, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "number", - "range": [ - 455, - 461 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 508, - 510 - ], - "loc": { - "start": { - "line": 29, - "column": 14 - }, - "end": { - "line": 30, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 511, - 512 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 513, - 518 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 520, - 530 - ], - "loc": { - "start": { - "line": 30, - "column": 11 - }, - "end": { - "line": 30, - "column": 21 - } - } - } - ], - "range": [ - 513, - 531 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 510, - 532 - ], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 533, - 538 - ], - "loc": { - "start": { - "line": 30, - "column": 24 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 539, - 546 - ], - "loc": { - "start": { - "line": 30, - "column": 30 - }, - "end": { - "line": 30, - "column": 37 - } - } - }, - "range": [ - 533, - 546 - ], - "loc": { - "start": { - "line": 30, - "column": 24 - }, - "end": { - "line": 30, - "column": 37 - } - } - }, - "range": [ - 532, - 547 - ], - "loc": { - "start": { - "line": 30, - "column": 23 - }, - "end": { - "line": 30, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 547, - 551 - ], - "loc": { - "start": { - "line": 30, - "column": 38 - }, - "end": { - "line": 30, - "column": 42 - } - } - }, - "range": [ - 510, - 551 - ], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 551, - 552 - ], - "loc": { - "start": { - "line": 30, - "column": 42 - }, - "end": { - "line": 31, - "column": 0 - } - } - } - ], - "range": [ - 494, - 552 - ], - "loc": { - "start": { - "line": 29, - "column": 0 - }, - "end": { - "line": 31, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 533, - 538 - ], - "loc": { - "start": { - "line": 30, - "column": 24 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 533, - 538 - ], - "loc": { - "start": { - "line": 30, - "column": 24 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 583, - 588 - ], - "loc": { - "start": { - "line": 33, - "column": 21 - }, - "end": { - "line": 33, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 583, - 588 - ], - "loc": { - "start": { - "line": 33, - "column": 21 - }, - "end": { - "line": 33, - "column": 26 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 583, - 588 - ], - "loc": { - "start": { - "line": 33, - "column": 21 - }, - "end": { - "line": 33, - "column": 26 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 589, - 591 - ], - "loc": { - "start": { - "line": 33, - "column": 27 - }, - "end": { - "line": 34, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 592, - 593 - ], - "loc": { - "start": { - "line": 34, - "column": 2 - }, - "end": { - "line": 34, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 591, - 594 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 34, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "the value is ", - "range": [ - 594, - 607 - ], - "loc": { - "start": { - "line": 34, - "column": 4 - }, - "end": { - "line": 34, - "column": 17 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "value", - "range": [ - 608, - 613 - ], - "loc": { - "start": { - "line": 34, - "column": 18 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "range": [ - 607, - 614 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 614, - 618 - ], - "loc": { - "start": { - "line": 34, - "column": 24 - }, - "end": { - "line": 34, - "column": 28 - } - } - }, - "range": [ - 591, - 618 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 34, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 618, - 619 - ], - "loc": { - "start": { - "line": 34, - "column": 28 - }, - "end": { - "line": 35, - "column": 0 - } - } - } - ], - "range": [ - 562, - 619 - ], - "loc": { - "start": { - "line": 33, - "column": 0 - }, - "end": { - "line": 35, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 608, - 613 - ], - "loc": { - "start": { - "line": 34, - "column": 18 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 583, - 588 - ], - "loc": { - "start": { - "line": 33, - "column": 21 - }, - "end": { - "line": 33, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 608, - 613 - ], - "loc": { - "start": { - "line": 34, - "column": 18 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 583, - 588 - ], - "loc": { - "start": { - "line": 33, - "column": 21 - }, - "end": { - "line": 33, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 651, - 656 - ], - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 651, - 656 - ], - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 27 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": true, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 651, - 656 - ], - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 27 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 657, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 28 - }, - "end": { - "line": 38, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 660, - 661 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 662, - 667 - ], - "loc": { - "start": { - "line": 38, - "column": 4 - }, - "end": { - "line": 38, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 669, - 679 - ], - "loc": { - "start": { - "line": 38, - "column": 11 - }, - "end": { - "line": 38, - "column": 21 - } - } - } - ], - "range": [ - 662, - 680 - ], - "loc": { - "start": { - "line": 38, - "column": 4 - }, - "end": { - "line": 38, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 659, - 681 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 682, - 687 - ], - "loc": { - "start": { - "line": 38, - "column": 24 - }, - "end": { - "line": 38, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 688, - 695 - ], - "loc": { - "start": { - "line": 38, - "column": 30 - }, - "end": { - "line": 38, - "column": 37 - } - } - }, - "range": [ - 682, - 695 - ], - "loc": { - "start": { - "line": 38, - "column": 24 - }, - "end": { - "line": 38, - "column": 37 - } - } - }, - "range": [ - 681, - 696 - ], - "loc": { - "start": { - "line": 38, - "column": 23 - }, - "end": { - "line": 38, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 696, - 700 - ], - "loc": { - "start": { - "line": 38, - "column": 38 - }, - "end": { - "line": 38, - "column": 42 - } - } - }, - "range": [ - 659, - 700 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 700, - 701 - ], - "loc": { - "start": { - "line": 38, - "column": 42 - }, - "end": { - "line": 39, - "column": 0 - } - } - } - ], - "range": [ - 629, - 701 - ], - "loc": { - "start": { - "line": 37, - "column": 0 - }, - "end": { - "line": 39, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 682, - 687 - ], - "loc": { - "start": { - "line": 38, - "column": 24 - }, - "end": { - "line": 38, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 651, - 656 - ], - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 27 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 682, - 687 - ], - "loc": { - "start": { - "line": 38, - "column": 24 - }, - "end": { - "line": 38, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 651, - 656 - ], - "loc": { - "start": { - "line": 37, - "column": 22 - }, - "end": { - "line": 37, - "column": 27 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 732, - 737 - ], - "loc": { - "start": { - "line": 41, - "column": 21 - }, - "end": { - "line": 41, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 732, - 737 - ], - "loc": { - "start": { - "line": 41, - "column": 21 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - "node": { - "type": "SvelteAwaitThenBlock", - "awaitThen": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 732, - 737 - ], - "loc": { - "start": { - "line": 41, - "column": 21 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 738, - 740 - ], - "loc": { - "start": { - "line": 41, - "column": 27 - }, - "end": { - "line": 42, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 741, - 742 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 740, - 743 - ], - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 42, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "the value is ", - "range": [ - 743, - 756 - ], - "loc": { - "start": { - "line": 42, - "column": 4 - }, - "end": { - "line": 42, - "column": 17 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "value", - "range": [ - 757, - 762 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 23 - } - } - }, - "range": [ - 756, - 763 - ], - "loc": { - "start": { - "line": 42, - "column": 17 - }, - "end": { - "line": 42, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 763, - 767 - ], - "loc": { - "start": { - "line": 42, - "column": 24 - }, - "end": { - "line": 42, - "column": 28 - } - } - }, - "range": [ - 740, - 767 - ], - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 42, - "column": 28 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 767, - 768 - ], - "loc": { - "start": { - "line": 42, - "column": 28 - }, - "end": { - "line": 43, - "column": 0 - } - } - } - ], - "range": [ - 711, - 768 - ], - "loc": { - "start": { - "line": 41, - "column": 0 - }, - "end": { - "line": 43, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 757, - 762 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 732, - 737 - ], - "loc": { - "start": { - "line": 41, - "column": 21 - }, - "end": { - "line": 41, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 757, - 762 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 732, - 737 - ], - "loc": { - "start": { - "line": 41, - "column": 21 - }, - "end": { - "line": 41, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "error", - "identifiers": [ - { - "type": "Identifier", - "name": "error", - "range": [ - 776, - 781 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "error", - "range": [ - 776, - 781 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - }, - "node": { - "type": "SvelteAwaitCatchBlock", - "awaitCatch": false, - "error": { - "type": "Identifier", - "name": "error", - "range": [ - 776, - 781 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 782, - 784 - ], - "loc": { - "start": { - "line": 43, - "column": 14 - }, - "end": { - "line": 44, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 785, - 786 - ], - "loc": { - "start": { - "line": 44, - "column": 2 - }, - "end": { - "line": 44, - "column": 3 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 787, - 792 - ], - "loc": { - "start": { - "line": 44, - "column": 4 - }, - "end": { - "line": 44, - "column": 9 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "color: red", - "range": [ - 794, - 804 - ], - "loc": { - "start": { - "line": 44, - "column": 11 - }, - "end": { - "line": 44, - "column": 21 - } - } - } - ], - "range": [ - 787, - 805 - ], - "loc": { - "start": { - "line": 44, - "column": 4 - }, - "end": { - "line": 44, - "column": 22 - } - } - } - ], - "selfClosing": false, - "range": [ - 784, - 806 - ], - "loc": { - "start": { - "line": 44, - "column": 1 - }, - "end": { - "line": 44, - "column": 23 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "error", - "range": [ - 807, - 812 - ], - "loc": { - "start": { - "line": 44, - "column": 24 - }, - "end": { - "line": 44, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "message", - "range": [ - 813, - 820 - ], - "loc": { - "start": { - "line": 44, - "column": 30 - }, - "end": { - "line": 44, - "column": 37 - } - } - }, - "range": [ - 807, - 820 - ], - "loc": { - "start": { - "line": 44, - "column": 24 - }, - "end": { - "line": 44, - "column": 37 - } - } - }, - "range": [ - 806, - 821 - ], - "loc": { - "start": { - "line": 44, - "column": 23 - }, - "end": { - "line": 44, - "column": 38 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 821, - 825 - ], - "loc": { - "start": { - "line": 44, - "column": 38 - }, - "end": { - "line": 44, - "column": 42 - } - } - }, - "range": [ - 784, - 825 - ], - "loc": { - "start": { - "line": 44, - "column": 1 - }, - "end": { - "line": 44, - "column": 42 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 825, - 826 - ], - "loc": { - "start": { - "line": 44, - "column": 42 - }, - "end": { - "line": 45, - "column": 0 - } - } - } - ], - "range": [ - 768, - 826 - ], - "loc": { - "start": { - "line": 43, - "column": 0 - }, - "end": { - "line": 45, - "column": 0 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 807, - 812 - ], - "loc": { - "start": { - "line": 44, - "column": 24 - }, - "end": { - "line": 44, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 776, - 781 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "error", - "range": [ - 807, - 812 - ], - "loc": { - "start": { - "line": 44, - "column": 24 - }, - "end": { - "line": 44, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "error", - "range": [ - 776, - 781 - ], - "loc": { - "start": { - "line": 43, - "column": 8 - }, - "end": { - "line": 43, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 65, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 20 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json index aa286c67..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,14653 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onMount", - "identifiers": [ - { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "canvas", - "identifiers": [ - { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "init": null, - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 1079, - 1085 - ], - "loc": { - "start": { - "line": 50, - "column": 12 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 60, - 67 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 1079, - 1085 - ], - "loc": { - "start": { - "line": 50, - "column": 12 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "ctx", - "identifiers": [ - { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'2d'", - "value": "2d", - "range": [ - 108, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 36 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getContext", - "range": [ - 97, - 107 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "range": [ - 90, - 107 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 90, - 113 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "range": [ - 84, - 113 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 37 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 242, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 747, - 750 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ] - }, - { - "name": "frame", - "identifiers": [ - { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "loop", - "range": [ - 151, - 155 - ], - "loc": { - "start": { - "line": 8, - "column": 36 - }, - "end": { - "line": 8, - "column": 40 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 129, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 129, - 156 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "range": [ - 121, - 156 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 183, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 828, - 833 - ], - "loc": { - "start": { - "line": 34, - "column": 24 - }, - "end": { - "line": 34, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - } - ] - }, - { - "name": "loop", - "identifiers": [ - { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "frame", - "range": [ - 183, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "loop", - "range": [ - 213, - 217 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 37 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "optional": false, - "range": [ - 191, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 38 - } - } - }, - "range": [ - 183, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 38 - } - } - }, - "range": [ - 183, - 219 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 39 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 259, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 38 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 262, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 41 - }, - "end": { - "line": 13, - "column": 42 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 13, - "column": 51 - }, - "end": { - "line": 13, - "column": 56 - } - } - }, - "range": [ - 265, - 277 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 56 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 286, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 65 - }, - "end": { - "line": 13, - "column": 71 - } - } - }, - "range": [ - 279, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 71 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "ctx", - "range": [ - 242, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getImageData", - "range": [ - 246, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "range": [ - 242, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "optional": false, - "range": [ - 242, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 72 - } - } - }, - "range": [ - 230, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 72 - } - } - } - ], - "range": [ - 224, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 73 - } - } - }, - { - "type": "ForStatement", - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 366, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 370, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "range": [ - 366, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "range": [ - 362, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 19 - } - } - } - ], - "range": [ - 356, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 387, - 388 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "operator": "%", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 398, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 391, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 387, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 383, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 30 - } - } - } - ], - "range": [ - 377, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 430, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 423, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 419, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "operator": ">>>", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 441, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 36 - }, - "end": { - "line": 18, - "column": 37 - } - } - }, - "range": [ - 419, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 37 - } - } - }, - "range": [ - 415, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 37 - } - } - } - ], - "range": [ - 409, - 443 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 38 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 459, - 461 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 16 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 465, - 468 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 471, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "range": [ - 465, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 482, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 37 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 475, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 465, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 459, - 488 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 43 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 492, - 494 - ], - "loc": { - "start": { - "line": 20, - "column": 47 - }, - "end": { - "line": 20, - "column": 49 - } - } - }, - "operator": "*", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 510, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 65 - }, - "end": { - "line": 20, - "column": 69 - } - } - }, - "range": [ - 506, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 69 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sin", - "range": [ - 502, - 505 - ], - "loc": { - "start": { - "line": 20, - "column": 57 - }, - "end": { - "line": 20, - "column": 60 - } - } - }, - "range": [ - 497, - 505 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 60 - } - } - }, - "optional": false, - "range": [ - 497, - 515 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 70 - } - } - }, - "range": [ - 492, - 515 - ], - "loc": { - "start": { - "line": 20, - "column": 47 - }, - "end": { - "line": 20, - "column": 70 - } - } - }, - "range": [ - 459, - 516 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 71 - } - } - }, - "range": [ - 455, - 516 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 71 - } - } - } - ], - "range": [ - 449, - 517 - ], - "loc": { - "start": { - "line": 20, - "column": 4 - }, - "end": { - "line": 20, - "column": 72 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 532, - 534 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 16 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 538, - 541 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 23 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 544, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 26 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "range": [ - 538, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 555, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 548, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 538, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 532, - 562 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 44 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 566, - 568 - ], - "loc": { - "start": { - "line": 21, - "column": 48 - }, - "end": { - "line": 21, - "column": 50 - } - } - }, - "operator": "*", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 584, - 588 - ], - "loc": { - "start": { - "line": 21, - "column": 66 - }, - "end": { - "line": 21, - "column": 70 - } - } - }, - "range": [ - 580, - 588 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 70 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "cos", - "range": [ - 576, - 579 - ], - "loc": { - "start": { - "line": 21, - "column": 58 - }, - "end": { - "line": 21, - "column": 61 - } - } - }, - "range": [ - 571, - 579 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 61 - } - } - }, - "optional": false, - "range": [ - 571, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 71 - } - } - }, - "range": [ - 566, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 48 - }, - "end": { - "line": 21, - "column": 71 - } - } - }, - "range": [ - 532, - 590 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 72 - } - } - }, - "range": [ - 528, - 590 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 72 - } - } - } - ], - "range": [ - 522, - 591 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 73 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 606, - 609 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 17 - } - } - }, - "range": [ - 602, - 609 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 17 - } - } - } - ], - "range": [ - 596, - 610 - ], - "loc": { - "start": { - "line": 22, - "column": 4 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 626, - 630 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 18 - } - } - }, - "range": [ - 616, - 630 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 631, - 632 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 635, - 636 - ], - "loc": { - "start": { - "line": 24, - "column": 23 - }, - "end": { - "line": 24, - "column": 24 - } - } - }, - "range": [ - 631, - 636 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 24 - } - } - }, - "range": [ - 616, - 637 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "r", - "range": [ - 640, - 641 - ], - "loc": { - "start": { - "line": 24, - "column": 28 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "range": [ - 616, - 641 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "range": [ - 616, - 642 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 647, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 657, - 661 - ], - "loc": { - "start": { - "line": 25, - "column": 14 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "range": [ - 647, - 661 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 662, - 663 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 666, - 667 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 24 - } - } - }, - "range": [ - 662, - 667 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 24 - } - } - }, - "range": [ - 647, - 668 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "g", - "range": [ - 671, - 672 - ], - "loc": { - "start": { - "line": 25, - "column": 28 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "range": [ - 647, - 672 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "range": [ - 647, - 673 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 678, - 687 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 688, - 692 - ], - "loc": { - "start": { - "line": 26, - "column": 14 - }, - "end": { - "line": 26, - "column": 18 - } - } - }, - "range": [ - 678, - 692 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 693, - 694 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 697, - 698 - ], - "loc": { - "start": { - "line": 26, - "column": 23 - }, - "end": { - "line": 26, - "column": 24 - } - } - }, - "range": [ - 693, - 698 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 24 - } - } - }, - "range": [ - 678, - 699 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "b", - "range": [ - 702, - 703 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 26, - "column": 29 - } - } - }, - "range": [ - 678, - 703 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 29 - } - } - }, - "range": [ - 678, - 704 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 709, - 718 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 719, - 723 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "range": [ - 709, - 723 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 724, - 725 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 728, - 729 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "range": [ - 724, - 729 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "range": [ - 709, - 730 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "255", - "value": 255, - "range": [ - 733, - 736 - ], - "loc": { - "start": { - "line": 27, - "column": 28 - }, - "end": { - "line": 27, - "column": 31 - } - } - }, - "range": [ - 709, - 736 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 31 - } - } - }, - "range": [ - 709, - 737 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 32 - } - } - } - ], - "range": [ - 350, - 742 - ], - "loc": { - "start": { - "line": 15, - "column": 54 - }, - "end": { - "line": 28, - "column": 4 - } - } - }, - "init": { - "type": "VariableDeclaration", - "kind": "let", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 312, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "range": [ - 308, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - ], - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "operator": "<", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 319, - 328 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 329, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 37 - } - } - }, - "range": [ - 319, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 37 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 38 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "range": [ - 319, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "range": [ - 315, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "update": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 342, - 343 - ], - "loc": { - "start": { - "line": 15, - "column": 46 - }, - "end": { - "line": 15, - "column": 47 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 51 - }, - "end": { - "line": 15, - "column": 52 - } - } - }, - "range": [ - 342, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 46 - }, - "end": { - "line": 15, - "column": 52 - } - } - }, - "range": [ - 299, - 742 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 28, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "imageData", - "range": [ - 764, - 773 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 775, - 776 - ], - "loc": { - "start": { - "line": 30, - "column": 31 - }, - "end": { - "line": 30, - "column": 32 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 778, - 779 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 35 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "ctx", - "range": [ - 747, - 750 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "putImageData", - "range": [ - 751, - 763 - ], - "loc": { - "start": { - "line": 30, - "column": 7 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "range": [ - 747, - 763 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 747, - 780 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 36 - } - } - }, - "range": [ - 747, - 781 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 37 - } - } - } - ], - "range": [ - 178, - 785 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 31, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - ], - "range": [ - 161, - 785 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 31, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 151, - 155 - ], - "loc": { - "start": { - "line": 8, - "column": 36 - }, - "end": { - "line": 8, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 213, - 217 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 129, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 151, - 155 - ], - "loc": { - "start": { - "line": 8, - "column": 36 - }, - "end": { - "line": 8, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "frame", - "range": [ - 183, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "loop", - "range": [ - 213, - 217 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 37 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "optional": false, - "range": [ - 191, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 38 - } - } - }, - "range": [ - 183, - 218 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 38 - } - } - }, - "range": [ - 183, - 219 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 39 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 259, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 38 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 262, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 41 - }, - "end": { - "line": 13, - "column": 42 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 13, - "column": 51 - }, - "end": { - "line": 13, - "column": 56 - } - } - }, - "range": [ - 265, - 277 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 56 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 286, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 65 - }, - "end": { - "line": 13, - "column": 71 - } - } - }, - "range": [ - 279, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 71 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "ctx", - "range": [ - 242, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getImageData", - "range": [ - 246, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "range": [ - 242, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "optional": false, - "range": [ - 242, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 72 - } - } - }, - "range": [ - 230, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 72 - } - } - } - ], - "range": [ - 224, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 73 - } - } - }, - { - "type": "ForStatement", - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 366, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 370, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "range": [ - 366, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "range": [ - 362, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 19 - } - } - } - ], - "range": [ - 356, - 372 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 387, - 388 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "operator": "%", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 398, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 391, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 387, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 383, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 30 - } - } - } - ], - "range": [ - 377, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 4 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 430, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 423, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 419, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "operator": ">>>", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 441, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 36 - }, - "end": { - "line": 18, - "column": 37 - } - } - }, - "range": [ - 419, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 37 - } - } - }, - "range": [ - 415, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 37 - } - } - } - ], - "range": [ - 409, - 443 - ], - "loc": { - "start": { - "line": 18, - "column": 4 - }, - "end": { - "line": 18, - "column": 38 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 459, - 461 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 16 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 465, - 468 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 471, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "range": [ - 465, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 482, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 37 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 475, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 465, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 459, - 488 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 43 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 492, - 494 - ], - "loc": { - "start": { - "line": 20, - "column": 47 - }, - "end": { - "line": 20, - "column": 49 - } - } - }, - "operator": "*", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 510, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 65 - }, - "end": { - "line": 20, - "column": 69 - } - } - }, - "range": [ - 506, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 69 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sin", - "range": [ - 502, - 505 - ], - "loc": { - "start": { - "line": 20, - "column": 57 - }, - "end": { - "line": 20, - "column": 60 - } - } - }, - "range": [ - 497, - 505 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 60 - } - } - }, - "optional": false, - "range": [ - 497, - 515 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 70 - } - } - }, - "range": [ - 492, - 515 - ], - "loc": { - "start": { - "line": 20, - "column": 47 - }, - "end": { - "line": 20, - "column": 70 - } - } - }, - "range": [ - 459, - 516 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 71 - } - } - }, - "range": [ - 455, - 516 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 71 - } - } - } - ], - "range": [ - 449, - 517 - ], - "loc": { - "start": { - "line": 20, - "column": 4 - }, - "end": { - "line": 20, - "column": 72 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 532, - 534 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 16 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 538, - 541 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 23 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 544, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 26 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "range": [ - 538, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 555, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 548, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 538, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 532, - 562 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 44 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 566, - 568 - ], - "loc": { - "start": { - "line": 21, - "column": 48 - }, - "end": { - "line": 21, - "column": 50 - } - } - }, - "operator": "*", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 584, - 588 - ], - "loc": { - "start": { - "line": 21, - "column": 66 - }, - "end": { - "line": 21, - "column": 70 - } - } - }, - "range": [ - 580, - 588 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 70 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "cos", - "range": [ - 576, - 579 - ], - "loc": { - "start": { - "line": 21, - "column": 58 - }, - "end": { - "line": 21, - "column": 61 - } - } - }, - "range": [ - 571, - 579 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 61 - } - } - }, - "optional": false, - "range": [ - 571, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 71 - } - } - }, - "range": [ - 566, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 48 - }, - "end": { - "line": 21, - "column": 71 - } - } - }, - "range": [ - 532, - 590 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 72 - } - } - }, - "range": [ - 528, - 590 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 72 - } - } - } - ], - "range": [ - 522, - 591 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 73 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 606, - 609 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 17 - } - } - }, - "range": [ - 602, - 609 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 17 - } - } - } - ], - "range": [ - 596, - 610 - ], - "loc": { - "start": { - "line": 22, - "column": 4 - }, - "end": { - "line": 22, - "column": 18 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 626, - 630 - ], - "loc": { - "start": { - "line": 24, - "column": 14 - }, - "end": { - "line": 24, - "column": 18 - } - } - }, - "range": [ - 616, - 630 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 631, - 632 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 635, - 636 - ], - "loc": { - "start": { - "line": 24, - "column": 23 - }, - "end": { - "line": 24, - "column": 24 - } - } - }, - "range": [ - 631, - 636 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 24 - } - } - }, - "range": [ - 616, - 637 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "r", - "range": [ - 640, - 641 - ], - "loc": { - "start": { - "line": 24, - "column": 28 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "range": [ - 616, - 641 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "range": [ - 616, - 642 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 647, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 657, - 661 - ], - "loc": { - "start": { - "line": 25, - "column": 14 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "range": [ - 647, - 661 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 662, - 663 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 666, - 667 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 24 - } - } - }, - "range": [ - 662, - 667 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 24 - } - } - }, - "range": [ - 647, - 668 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "g", - "range": [ - 671, - 672 - ], - "loc": { - "start": { - "line": 25, - "column": 28 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "range": [ - 647, - 672 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "range": [ - 647, - 673 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 678, - 687 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 688, - 692 - ], - "loc": { - "start": { - "line": 26, - "column": 14 - }, - "end": { - "line": 26, - "column": 18 - } - } - }, - "range": [ - 678, - 692 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 693, - 694 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 697, - 698 - ], - "loc": { - "start": { - "line": 26, - "column": 23 - }, - "end": { - "line": 26, - "column": 24 - } - } - }, - "range": [ - 693, - 698 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 24 - } - } - }, - "range": [ - 678, - 699 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "b", - "range": [ - 702, - 703 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 26, - "column": 29 - } - } - }, - "range": [ - 678, - 703 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 29 - } - } - }, - "range": [ - 678, - 704 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 30 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 709, - 718 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 719, - 723 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "range": [ - 709, - 723 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 724, - 725 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 728, - 729 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "range": [ - 724, - 729 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "range": [ - 709, - 730 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 25 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "255", - "value": 255, - "range": [ - 733, - 736 - ], - "loc": { - "start": { - "line": 27, - "column": 28 - }, - "end": { - "line": 27, - "column": 31 - } - } - }, - "range": [ - 709, - 736 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 31 - } - } - }, - "range": [ - 709, - 737 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 32 - } - } - } - ], - "range": [ - 350, - 742 - ], - "loc": { - "start": { - "line": 15, - "column": 54 - }, - "end": { - "line": 28, - "column": 4 - } - } - }, - "init": { - "type": "VariableDeclaration", - "kind": "let", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 312, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "range": [ - 308, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - ], - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "operator": "<", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "imageData", - "range": [ - 319, - 328 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "data", - "range": [ - 329, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 37 - } - } - }, - "range": [ - 319, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 37 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 334, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 38 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "range": [ - 319, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "range": [ - 315, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 44 - } - } - }, - "update": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 342, - 343 - ], - "loc": { - "start": { - "line": 15, - "column": 46 - }, - "end": { - "line": 15, - "column": 47 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 347, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 51 - }, - "end": { - "line": 15, - "column": 52 - } - } - }, - "range": [ - 342, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 46 - }, - "end": { - "line": 15, - "column": 52 - } - } - }, - "range": [ - 299, - 742 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 28, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "imageData", - "range": [ - 764, - 773 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 775, - 776 - ], - "loc": { - "start": { - "line": 30, - "column": 31 - }, - "end": { - "line": 30, - "column": 32 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 778, - 779 - ], - "loc": { - "start": { - "line": 30, - "column": 34 - }, - "end": { - "line": 30, - "column": 35 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "ctx", - "range": [ - 747, - 750 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "putImageData", - "range": [ - 751, - 763 - ], - "loc": { - "start": { - "line": 30, - "column": 7 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "range": [ - 747, - 763 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 747, - 780 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 36 - } - } - }, - "range": [ - 747, - 781 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 37 - } - } - } - ], - "range": [ - 178, - 785 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 31, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - ], - "range": [ - 161, - 785 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 31, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - } - ] - }, - { - "name": "imageData", - "identifiers": [ - { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 259, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 38 - }, - "end": { - "line": 13, - "column": 39 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 262, - 263 - ], - "loc": { - "start": { - "line": 13, - "column": 41 - }, - "end": { - "line": 13, - "column": 42 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 13, - "column": 51 - }, - "end": { - "line": 13, - "column": 56 - } - } - }, - "range": [ - 265, - 277 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 56 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 286, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 65 - }, - "end": { - "line": 13, - "column": 71 - } - } - }, - "range": [ - 279, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 71 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "ctx", - "range": [ - 242, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getImageData", - "range": [ - 246, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "range": [ - 242, - 258 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "optional": false, - "range": [ - 242, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 72 - } - } - }, - "range": [ - 230, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 72 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 319, - 328 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 32 - } - } - }, - "from": "for", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 647, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 678, - 687 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 709, - 718 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 764, - 773 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 183, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 213, - 217 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 242, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 747, - 750 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 764, - 773 - ], - "loc": { - "start": { - "line": 30, - "column": 20 - }, - "end": { - "line": 30, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "for", - "variables": [ - { - "name": "p", - "identifiers": [ - { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 312, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "range": [ - 308, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "for", - "init": true, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "from": "for", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 342, - 343 - ], - "loc": { - "start": { - "line": 15, - "column": 46 - }, - "end": { - "line": 15, - "column": 47 - } - } - }, - "from": "for", - "init": false, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 366, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 631, - 632 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 662, - 663 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 693, - 694 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 724, - 725 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "for", - "init": true, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 20 - } - } - }, - "from": "for", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 319, - 328 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 32 - } - } - }, - "from": "for", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 342, - 343 - ], - "loc": { - "start": { - "line": 15, - "column": 46 - }, - "end": { - "line": 15, - "column": 47 - } - } - }, - "from": "for", - "init": false, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [ - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "p", - "range": [ - 366, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 370, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "range": [ - 366, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "range": [ - 362, - 371 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 387, - 388 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - } - ] - }, - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 387, - 388 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "operator": "%", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 398, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 391, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 387, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 30 - } - } - }, - "range": [ - 383, - 403 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 471, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - } - ] - }, - { - "name": "y", - "identifiers": [ - { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 430, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 423, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 419, - 436 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "operator": ">>>", - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 441, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 36 - }, - "end": { - "line": 18, - "column": 37 - } - } - }, - "range": [ - 419, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 37 - } - } - }, - "range": [ - 415, - 442 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 37 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 544, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 26 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ] - }, - { - "name": "r", - "identifiers": [ - { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 459, - 461 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 16 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 465, - 468 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "x", - "range": [ - 471, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "range": [ - 465, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "width", - "range": [ - 482, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 37 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 475, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 465, - 487 - ], - "loc": { - "start": { - "line": 20, - "column": 20 - }, - "end": { - "line": 20, - "column": 42 - } - } - }, - "range": [ - 459, - 488 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 43 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 492, - 494 - ], - "loc": { - "start": { - "line": 20, - "column": 47 - }, - "end": { - "line": 20, - "column": 49 - } - } - }, - "operator": "*", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 510, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 65 - }, - "end": { - "line": 20, - "column": 69 - } - } - }, - "range": [ - 506, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 69 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sin", - "range": [ - 502, - 505 - ], - "loc": { - "start": { - "line": 20, - "column": 57 - }, - "end": { - "line": 20, - "column": 60 - } - } - }, - "range": [ - 497, - 505 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 60 - } - } - }, - "optional": false, - "range": [ - 497, - 515 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 70 - } - } - }, - "range": [ - 492, - 515 - ], - "loc": { - "start": { - "line": 20, - "column": 47 - }, - "end": { - "line": 20, - "column": 70 - } - } - }, - "range": [ - 459, - 516 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 71 - } - } - }, - "range": [ - 455, - 516 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 71 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 640, - 641 - ], - "loc": { - "start": { - "line": 24, - "column": 28 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - } - ] - }, - { - "name": "g", - "identifiers": [ - { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 532, - 534 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 16 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 538, - 541 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 23 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "y", - "range": [ - 544, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 26 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "range": [ - 538, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "operator": "/", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "height", - "range": [ - 555, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 548, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 538, - 561 - ], - "loc": { - "start": { - "line": 21, - "column": 20 - }, - "end": { - "line": 21, - "column": 43 - } - } - }, - "range": [ - 532, - 562 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 44 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "64", - "value": 64, - "range": [ - 566, - 568 - ], - "loc": { - "start": { - "line": 21, - "column": 48 - }, - "end": { - "line": 21, - "column": 50 - } - } - }, - "operator": "*", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 584, - 588 - ], - "loc": { - "start": { - "line": 21, - "column": 66 - }, - "end": { - "line": 21, - "column": 70 - } - } - }, - "range": [ - 580, - 588 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 70 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "cos", - "range": [ - 576, - 579 - ], - "loc": { - "start": { - "line": 21, - "column": 58 - }, - "end": { - "line": 21, - "column": 61 - } - } - }, - "range": [ - 571, - 579 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 61 - } - } - }, - "optional": false, - "range": [ - 571, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 71 - } - } - }, - "range": [ - 566, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 48 - }, - "end": { - "line": 21, - "column": 71 - } - } - }, - "range": [ - 532, - 590 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 72 - } - } - }, - "range": [ - 528, - 590 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 72 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "g", - "range": [ - 671, - 672 - ], - "loc": { - "start": { - "line": 25, - "column": 28 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "128", - "value": 128, - "range": [ - 606, - 609 - ], - "loc": { - "start": { - "line": 22, - "column": 14 - }, - "end": { - "line": 22, - "column": 17 - } - } - }, - "range": [ - 602, - 609 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 702, - 703 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 26, - "column": 29 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 366, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 387, - 388 - ], - "loc": { - "start": { - "line": 17, - "column": 14 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 18, - "column": 14 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 362, - 363 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 471, - 472 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 383, - 384 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 544, - 545 - ], - "loc": { - "start": { - "line": 21, - "column": 26 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 415, - 416 - ], - "loc": { - "start": { - "line": 18, - "column": 10 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 631, - 632 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "r", - "range": [ - 640, - 641 - ], - "loc": { - "start": { - "line": 24, - "column": 28 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "r", - "range": [ - 455, - 456 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 647, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 662, - 663 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "g", - "range": [ - 671, - 672 - ], - "loc": { - "start": { - "line": 25, - "column": 28 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "g", - "range": [ - 528, - 529 - ], - "loc": { - "start": { - "line": 21, - "column": 10 - }, - "end": { - "line": 21, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 678, - 687 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 693, - 694 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 702, - 703 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 26, - "column": 29 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 602, - 603 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 709, - 718 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 724, - 725 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 366, - 367 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 631, - 632 - ], - "loc": { - "start": { - "line": 24, - "column": 19 - }, - "end": { - "line": 24, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 647, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 662, - 663 - ], - "loc": { - "start": { - "line": 25, - "column": 19 - }, - "end": { - "line": 25, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 678, - 687 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 693, - 694 - ], - "loc": { - "start": { - "line": 26, - "column": 19 - }, - "end": { - "line": 26, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 709, - 718 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "p", - "range": [ - 724, - 725 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "p", - "range": [ - 308, - 309 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 319, - 328 - ], - "loc": { - "start": { - "line": 15, - "column": 23 - }, - "end": { - "line": 15, - "column": 32 - } - } - }, - "from": "for", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 506, - 507 - ], - "loc": { - "start": { - "line": 20, - "column": 61 - }, - "end": { - "line": 20, - "column": 62 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 580, - 581 - ], - "loc": { - "start": { - "line": 21, - "column": 62 - }, - "end": { - "line": 21, - "column": 63 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 175, - 176 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 647, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 678, - 687 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "imageData", - "range": [ - 709, - 718 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imageData", - "range": [ - 230, - 239 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 18 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 183, - 188 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 213, - 217 - ], - "loc": { - "start": { - "line": 11, - "column": 33 - }, - "end": { - "line": 11, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 170, - 174 - ], - "loc": { - "start": { - "line": 10, - "column": 11 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 242, - 245 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "ctx", - "range": [ - 747, - 750 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ctx", - "range": [ - 84, - 87 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 807, - 827 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 828, - 833 - ], - "loc": { - "start": { - "line": 34, - "column": 24 - }, - "end": { - "line": 34, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 807, - 827 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 828, - 833 - ], - "loc": { - "start": { - "line": 34, - "column": 24 - }, - "end": { - "line": 34, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 121, - 126 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 11 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 90, - 96 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 129, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 50 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 279, - 285 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 64 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 391, - 397 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 423, - 429 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 475, - 481 - ], - "loc": { - "start": { - "line": 20, - "column": 30 - }, - "end": { - "line": 20, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "canvas", - "range": [ - 548, - 554 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "canvas", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 807, - 827 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 129, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 807, - 827 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 129, - 150 - ], - "loc": { - "start": { - "line": 8, - "column": 14 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 191, - 212 - ], - "loc": { - "start": { - "line": 11, - "column": 11 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 497, - 501 - ], - "loc": { - "start": { - "line": 20, - "column": 52 - }, - "end": { - "line": 20, - "column": 56 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 571, - 575 - ], - "loc": { - "start": { - "line": 21, - "column": 53 - }, - "end": { - "line": 21, - "column": 57 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 807, - 827 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json index c4bfa0d1..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,455 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "yes", - "identifiers": [ - { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 20, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 14, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 332, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 82, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "yes", - "range": [ - 332, - 335 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "yes", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json index 5779f6ed..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,440 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "big", - "identifiers": [ - { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 20, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 14, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 129, - 132 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 173, - 176 - ], - "loc": { - "start": { - "line": 17, - "column": 7 - }, - "end": { - "line": 17, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 129, - 132 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 161, - 164 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "big", - "range": [ - 173, - 176 - ], - "loc": { - "start": { - "line": 17, - "column": 7 - }, - "end": { - "line": 17, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "big", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json index 93f027b8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,828 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "current", - "identifiers": [ - { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "'foo'", - "value": "foo", - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 14, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 179, - 186 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 276, - 283 - ], - "loc": { - "start": { - "line": 22, - "column": 18 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 314, - 321 - ], - "loc": { - "start": { - "line": 23, - "column": 18 - }, - "end": { - "line": 23, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 364, - 371 - ], - "loc": { - "start": { - "line": 27, - "column": 9 - }, - "end": { - "line": 27, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 420, - 427 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 179, - 186 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 276, - 283 - ], - "loc": { - "start": { - "line": 22, - "column": 18 - }, - "end": { - "line": 22, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 364, - 371 - ], - "loc": { - "start": { - "line": 27, - "column": 9 - }, - "end": { - "line": 27, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 314, - 321 - ], - "loc": { - "start": { - "line": 23, - "column": 18 - }, - "end": { - "line": 23, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 314, - 321 - ], - "loc": { - "start": { - "line": 23, - "column": 18 - }, - "end": { - "line": 23, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 420, - 427 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 420, - 427 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json index a8d313ab..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1515 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Keypad", - "identifiers": [ - { - "type": "Identifier", - "name": "Keypad", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "pin", - "identifiers": [ - { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "init": null, - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 174, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 21 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 215, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 272, - 275 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - } - ] - }, - { - "name": "view", - "identifiers": [ - { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "ConditionalExpression", - "alternate": { - "type": "Literal", - "raw": "'enter your pin'", - "value": "enter your pin", - "range": [ - 107, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 48 - }, - "end": { - "line": 5, - "column": 64 - } - } - }, - "consequent": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "/\\d(?!$)/g", - "regex": { - "flags": "g", - "pattern": "\\d(?!$)" - }, - "value": "/\\d(?!$)/g", - "range": [ - 88, - 98 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - { - "type": "Literal", - "raw": "'•'", - "value": "•", - "range": [ - 100, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 41 - }, - "end": { - "line": 5, - "column": 44 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "pin", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "replace", - "range": [ - 80, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 28 - } - } - }, - "range": [ - 76, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 76, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 45 - } - } - }, - "test": { - "type": "Identifier", - "name": "pin", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 70, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 64 - } - } - }, - "range": [ - 63, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 64 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "view", - "range": [ - 240, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 44 - }, - "end": { - "line": 12, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "name": "handleSubmit", - "identifiers": [ - { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 136, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 136, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "pin", - "range": [ - 174, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 21 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "submitted ", - "raw": "submitted " - }, - "range": [ - 161, - 174 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 21 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 177, - 179 - ], - "loc": { - "start": { - "line": 8, - "column": 24 - }, - "end": { - "line": 8, - "column": 26 - } - } - } - ], - "range": [ - 161, - 179 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 26 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 155, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 155, - 180 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "range": [ - 155, - 181 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 28 - } - } - } - ], - "range": [ - 151, - 184 - ], - "loc": { - "start": { - "line": 7, - "column": 25 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 136, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "params": [], - "range": [ - 127, - 184 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 288, - 300 - ], - "loc": { - "start": { - "line": 14, - "column": 36 - }, - "end": { - "line": 14, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 136, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 70, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 215, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "view", - "range": [ - 240, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 44 - }, - "end": { - "line": 12, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "view", - "range": [ - 63, - 67 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 272, - 275 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 288, - 300 - ], - "loc": { - "start": { - "line": 14, - "column": 36 - }, - "end": { - "line": 14, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 136, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Keypad", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 155, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 174, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 21 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 155, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "pin", - "range": [ - 174, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 21 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pin", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 8 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 155, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 155, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json index 26140a9f..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3226 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "createEventDispatcher", - "identifiers": [ - { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "local": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 102, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 79, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 20 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 71, - 81 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 841, - 846 - ], - "loc": { - "start": { - "line": 37, - "column": 20 - }, - "end": { - "line": 37, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 941, - 946 - ], - "loc": { - "start": { - "line": 39, - "column": 20 - }, - "end": { - "line": 39, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ] - }, - { - "name": "dispatch", - "identifiers": [ - { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 102, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "optional": false, - "range": [ - 102, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 41 - } - } - }, - "range": [ - 91, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 227, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ] - }, - { - "name": "select", - "identifiers": [ - { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "value", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "operator": "+=", - "right": { - "type": "Identifier", - "name": "num", - "range": [ - 166, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 38 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "range": [ - 157, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 151, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 23 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "range": [ - 144, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "range": [ - 135, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 470, - 476 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 511, - 517 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 552, - 558 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 593, - 599 - ], - "loc": { - "start": { - "line": 30, - "column": 19 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 634, - 640 - ], - "loc": { - "start": { - "line": 31, - "column": 19 - }, - "end": { - "line": 31, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 675, - 681 - ], - "loc": { - "start": { - "line": 32, - "column": 19 - }, - "end": { - "line": 32, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 716, - 722 - ], - "loc": { - "start": { - "line": 33, - "column": 19 - }, - "end": { - "line": 33, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 757, - 763 - ], - "loc": { - "start": { - "line": 34, - "column": 19 - }, - "end": { - "line": 34, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 798, - 804 - ], - "loc": { - "start": { - "line": 35, - "column": 19 - }, - "end": { - "line": 35, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 899, - 905 - ], - "loc": { - "start": { - "line": 38, - "column": 19 - }, - "end": { - "line": 38, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ] - }, - { - "name": "clear", - "identifiers": [ - { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "value", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 201, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "range": [ - 193, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 187, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 16 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "range": [ - 178, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "clear", - "range": [ - 858, - 863 - ], - "loc": { - "start": { - "line": 37, - "column": 37 - }, - "end": { - "line": 37, - "column": 42 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - } - ] - }, - { - "name": "submit", - "identifiers": [ - { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'submit'", - "value": "submit", - "range": [ - 236, - 244 - ], - "loc": { - "start": { - "line": 10, - "column": 31 - }, - "end": { - "line": 10, - "column": 39 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 227, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 30 - } - } - }, - "optional": false, - "range": [ - 227, - 245 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 40 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 221, - 245 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 40 - } - } - }, - "range": [ - 212, - 245 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 40 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "submit", - "range": [ - 958, - 964 - ], - "loc": { - "start": { - "line": 39, - "column": 37 - }, - "end": { - "line": 39, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 102, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 470, - 476 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 27, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 511, - 517 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 552, - 558 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 593, - 599 - ], - "loc": { - "start": { - "line": 30, - "column": 19 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 634, - 640 - ], - "loc": { - "start": { - "line": 31, - "column": 19 - }, - "end": { - "line": 31, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 675, - 681 - ], - "loc": { - "start": { - "line": 32, - "column": 19 - }, - "end": { - "line": 32, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 716, - 722 - ], - "loc": { - "start": { - "line": 33, - "column": 19 - }, - "end": { - "line": 33, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 757, - 763 - ], - "loc": { - "start": { - "line": 34, - "column": 19 - }, - "end": { - "line": 34, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 798, - 804 - ], - "loc": { - "start": { - "line": 35, - "column": 19 - }, - "end": { - "line": 35, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 841, - 846 - ], - "loc": { - "start": { - "line": 37, - "column": 20 - }, - "end": { - "line": 37, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "clear", - "range": [ - 858, - 863 - ], - "loc": { - "start": { - "line": 37, - "column": 37 - }, - "end": { - "line": 37, - "column": 42 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "clear", - "range": [ - 178, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "select", - "range": [ - 899, - 905 - ], - "loc": { - "start": { - "line": 38, - "column": 19 - }, - "end": { - "line": 38, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "select", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 941, - 946 - ], - "loc": { - "start": { - "line": 39, - "column": 20 - }, - "end": { - "line": 39, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "submit", - "range": [ - 958, - 964 - ], - "loc": { - "start": { - "line": 39, - "column": 37 - }, - "end": { - "line": 39, - "column": 43 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "submit", - "range": [ - 212, - 218 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "num", - "identifiers": [ - { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "value", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "operator": "+=", - "right": { - "type": "Identifier", - "name": "num", - "range": [ - 166, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 38 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "range": [ - 157, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 151, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 23 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "range": [ - 144, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 166, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 38 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - } - ] - } - ], - "references": [], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 166, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 38 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "num", - "range": [ - 166, - 169 - ], - "loc": { - "start": { - "line": 8, - "column": 38 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "num", - "range": [ - 144, - 147 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 157, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 29 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 227, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 227, - 235 - ], - "loc": { - "start": { - "line": 10, - "column": 22 - }, - "end": { - "line": 10, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 91, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json index 096352ed..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,996 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Inner", - "identifiers": [ - { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handleMessage", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 94, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "range": [ - 88, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 88, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 82, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 82, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 78, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "range": [ - 48, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 141, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 141, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 94, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "range": [ - 88, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 88, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 82, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 82, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 78, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "range": [ - 48, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json index 520e306f..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,873 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "createEventDispatcher", - "identifiers": [ - { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "local": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 77, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "name": "dispatch", - "identifiers": [ - { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 77, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "optional": false, - "range": [ - 77, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 41 - } - } - }, - "range": [ - 66, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - }, - { - "name": "sayHello", - "identifiers": [ - { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'message'", - "value": "message", - "range": [ - 137, - 146 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 153, - 157 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Hello!'", - "value": "Hello!", - "range": [ - 159, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "range": [ - 153, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 17 - } - } - } - ], - "range": [ - 148, - 171 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 128, - 172 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 4 - } - } - }, - "range": [ - 128, - 173 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 5 - } - } - } - ], - "range": [ - 124, - 176 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "params": [], - "range": [ - 104, - 176 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 77, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json index 08a2ec32..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,8831 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onMount", - "identifiers": [ - { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 338, - 345 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "characters", - "identifiers": [ - { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'🥳'", - "value": "🥳", - "range": [ - 64, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - { - "type": "Literal", - "raw": "'🎉'", - "value": "🎉", - "range": [ - 70, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - { - "type": "Literal", - "raw": "'✨'", - "value": "✨", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "range": [ - 63, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 35 - } - } - }, - "range": [ - 50, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 167, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 182, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - }, - { - "name": "confetti", - "identifiers": [ - { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "a", - "range": [ - 324, - 325 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 326, - 327 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 324, - 327 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "b", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 332, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 26 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "range": [ - 330, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "range": [ - 324, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 314, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "character", - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "characters", - "range": [ - 167, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 178, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "operator": "%", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "characters", - "range": [ - 182, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 41 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 182, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 178, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 167, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 48 - } - } - }, - "range": [ - 156, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 48 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 206, - 207 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "range": [ - 209, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "optional": false, - "range": [ - 209, - 222 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 225, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "range": [ - 209, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "range": [ - 206, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 234, - 235 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "20", - "value": 20, - "range": [ - 238, - 240 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 237, - 240 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 248, - 254 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "range": [ - 243, - 254 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 243, - 256 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 259, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 243, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 237, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 234, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "r", - "range": [ - 268, - 269 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "0.1", - "value": 0.1, - "range": [ - 271, - 274 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 277, - 288 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 277, - 290 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 293, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 277, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 271, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 268, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 30 - } - } - } - ], - "range": [ - 150, - 299 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "range": [ - 143, - 300 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 13, - "column": 5 - } - } - } - ], - "range": [ - 138, - 304 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "_", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 128, - 304 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 14, - "column": 3 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "NewExpression", - "arguments": [ - { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 109, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 26 - }, - "end": { - "line": 6, - "column": 29 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Array", - "range": [ - 103, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 99, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "fill", - "range": [ - 114, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "range": [ - 99, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 99, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 37 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "map", - "range": [ - 124, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "range": [ - 99, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "optional": false, - "range": [ - 99, - 305 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 14, - "column": 4 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sort", - "range": [ - 309, - 313 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "range": [ - 99, - 313 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 99, - 334 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "range": [ - 88, - 334 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 15, - "column": 28 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 753, - 761 - ], - "loc": { - "start": { - "line": 47, - "column": 7 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Array", - "range": [ - 103, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 338, - 345 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 753, - 761 - ], - "loc": { - "start": { - "line": 47, - "column": 7 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "_", - "identifiers": [ - { - "type": "Identifier", - "name": "_", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "_", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "character", - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "characters", - "range": [ - 167, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 178, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "operator": "%", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "characters", - "range": [ - 182, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 41 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 182, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 178, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 167, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 48 - } - } - }, - "range": [ - 156, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 48 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 206, - 207 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "range": [ - 209, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "optional": false, - "range": [ - 209, - 222 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 225, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "range": [ - 209, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "range": [ - 206, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 234, - 235 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "20", - "value": 20, - "range": [ - 238, - 240 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 237, - 240 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 248, - 254 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "range": [ - 243, - 254 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 243, - 256 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 259, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 243, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 237, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 234, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "r", - "range": [ - 268, - 269 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "0.1", - "value": 0.1, - "range": [ - 271, - 274 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 277, - 288 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 277, - 290 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 293, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 277, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 271, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 268, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 30 - } - } - } - ], - "range": [ - 150, - 299 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "range": [ - 143, - 300 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 13, - "column": 5 - } - } - } - ], - "range": [ - 138, - 304 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "_", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 128, - 304 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 14, - "column": 3 - } - } - } - } - ], - "references": [] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "character", - "range": [ - 156, - 165 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "characters", - "range": [ - 167, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 178, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "operator": "%", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "characters", - "range": [ - 182, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 41 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 182, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 178, - 199 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 47 - } - } - }, - "range": [ - 167, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 48 - } - } - }, - "range": [ - 156, - 200 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 48 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 206, - 207 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 214, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "range": [ - 209, - 220 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "optional": false, - "range": [ - 209, - 222 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 225, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 23 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "range": [ - 209, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "range": [ - 206, - 228 - ], - "loc": { - "start": { - "line": 10, - "column": 4 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 234, - 235 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "20", - "value": 20, - "range": [ - 238, - 240 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 237, - 240 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 248, - 254 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "range": [ - 243, - 254 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 243, - 256 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 259, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 243, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 237, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 7 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 234, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "r", - "range": [ - 268, - 269 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "0.1", - "value": 0.1, - "range": [ - 271, - 274 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "range": [ - 277, - 288 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 277, - 290 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 293, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 277, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 271, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "range": [ - 268, - 294 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 30 - } - } - } - ], - "range": [ - 150, - 299 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 13, - "column": 4 - } - } - }, - "range": [ - 143, - 300 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 13, - "column": 5 - } - } - } - ], - "range": [ - 138, - 304 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "_", - "range": [ - 129, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - ], - "range": [ - 128, - 304 - ], - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 14, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 178, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 167, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 178, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 182, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 167, - 177 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "characters", - "range": [ - 182, - 192 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "characters", - "range": [ - 50, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "a", - "range": [ - 324, - 325 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 326, - 327 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 324, - 327 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "b", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 332, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 26 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "range": [ - 330, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "range": [ - 324, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 314, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 324, - 325 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "a", - "range": [ - 324, - 325 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 326, - 327 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 324, - 327 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "b", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 332, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 26 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "range": [ - 330, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "range": [ - 324, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 27 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "range": [ - 314, - 333 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 324, - 325 - ], - "loc": { - "start": { - "line": 15, - "column": 18 - }, - "end": { - "line": 15, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 315, - 316 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 330, - 331 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 318, - 319 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "frame", - "identifiers": [ - { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "init": null, - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 391, - 396 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 612, - 617 - ], - "loc": { - "start": { - "line": 32, - "column": 36 - }, - "end": { - "line": 32, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ] - }, - { - "name": "loop", - "identifiers": [ - { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "frame", - "range": [ - 391, - 396 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "loop", - "range": [ - 421, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 399, - 420 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "optional": false, - "range": [ - 399, - 426 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 38 - } - } - }, - "range": [ - 391, - 426 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 38 - } - } - }, - "range": [ - 391, - 427 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "confetti", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 471, - 476 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 477, - 478 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 11 - } - } - }, - "range": [ - 471, - 478 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 11 - } - } - }, - "operator": "+=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "0.7", - "value": 0.7, - "range": [ - 482, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 18 - } - } - }, - "operator": "*", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 488, - 493 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 494, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 27 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 488, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 482, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 471, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 471, - 496 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 520, - 525 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 526, - 527 - ], - "loc": { - "start": { - "line": 25, - "column": 29 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - "range": [ - 520, - 527 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - "operator": "=", - "right": { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "20", - "value": 20, - "range": [ - 531, - 533 - ], - "loc": { - "start": { - "line": 25, - "column": 34 - }, - "end": { - "line": 25, - "column": 36 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 530, - 533 - ], - "loc": { - "start": { - "line": 25, - "column": 33 - }, - "end": { - "line": 25, - "column": 36 - } - } - }, - "range": [ - 520, - 533 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 36 - } - } - }, - "range": [ - 520, - 534 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 37 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 511, - 512 - ], - "loc": { - "start": { - "line": 25, - "column": 14 - }, - "end": { - "line": 25, - "column": 15 - } - } - }, - "range": [ - 505, - 512 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 15 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 515, - 518 - ], - "loc": { - "start": { - "line": 25, - "column": 18 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "range": [ - 505, - 518 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "range": [ - 501, - 534 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 37 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "Identifier", - "name": "emoji", - "range": [ - 546, - 551 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 16 - } - } - }, - "range": [ - 539, - 552 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 17 - } - } - } - ], - "range": [ - 465, - 557 - ], - "loc": { - "start": { - "line": 23, - "column": 36 - }, - "end": { - "line": 27, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - ], - "range": [ - 456, - 557 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 27, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "confetti", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "map", - "range": [ - 452, - 455 - ], - "loc": { - "start": { - "line": 23, - "column": 23 - }, - "end": { - "line": 23, - "column": 26 - } - } - }, - "range": [ - 443, - 455 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 443, - 558 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 27, - "column": 5 - } - } - }, - "range": [ - 432, - 558 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 27, - "column": 5 - } - } - }, - "range": [ - 432, - 559 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 27, - "column": 6 - } - } - } - ], - "range": [ - 386, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 18 - }, - "end": { - "line": 28, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "params": [], - "range": [ - 370, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 2 - }, - "end": { - "line": 28, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 421, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 567, - 571 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 567, - 571 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 391, - 396 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 399, - 420 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 421, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "emoji", - "identifiers": [ - { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 471, - 476 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 477, - 478 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 11 - } - } - }, - "range": [ - 471, - 478 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 11 - } - } - }, - "operator": "+=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "0.7", - "value": 0.7, - "range": [ - 482, - 485 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 18 - } - } - }, - "operator": "*", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 488, - 493 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 494, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 27 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 488, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 482, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 471, - 495 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 471, - 496 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 520, - 525 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 526, - 527 - ], - "loc": { - "start": { - "line": 25, - "column": 29 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - "range": [ - 520, - 527 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - "operator": "=", - "right": { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "20", - "value": 20, - "range": [ - 531, - 533 - ], - "loc": { - "start": { - "line": 25, - "column": 34 - }, - "end": { - "line": 25, - "column": 36 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 530, - 533 - ], - "loc": { - "start": { - "line": 25, - "column": 33 - }, - "end": { - "line": 25, - "column": 36 - } - } - }, - "range": [ - 520, - 533 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 36 - } - } - }, - "range": [ - 520, - 534 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 37 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "emoji", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 511, - 512 - ], - "loc": { - "start": { - "line": 25, - "column": 14 - }, - "end": { - "line": 25, - "column": 15 - } - } - }, - "range": [ - 505, - 512 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 15 - } - } - }, - "operator": ">", - "right": { - "type": "Literal", - "raw": "120", - "value": 120, - "range": [ - 515, - 518 - ], - "loc": { - "start": { - "line": 25, - "column": 18 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "range": [ - 505, - 518 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "range": [ - 501, - 534 - ], - "loc": { - "start": { - "line": 25, - "column": 4 - }, - "end": { - "line": 25, - "column": 37 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "Identifier", - "name": "emoji", - "range": [ - 546, - 551 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 16 - } - } - }, - "range": [ - 539, - 552 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 17 - } - } - } - ], - "range": [ - 465, - 557 - ], - "loc": { - "start": { - "line": 23, - "column": 36 - }, - "end": { - "line": 27, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - ], - "range": [ - 456, - 557 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 27, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 471, - 476 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 488, - 493 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 520, - 525 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 546, - 551 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 471, - 476 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 24, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 488, - 493 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 520, - 525 - ], - "loc": { - "start": { - "line": 25, - "column": 23 - }, - "end": { - "line": 25, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "emoji", - "range": [ - 546, - 551 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "emoji", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 23, - "column": 27 - }, - "end": { - "line": 23, - "column": 32 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 391, - 396 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 399, - 420 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "loop", - "range": [ - 421, - 425 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "loop", - "range": [ - 379, - 383 - ], - "loc": { - "start": { - "line": 20, - "column": 11 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 591, - 611 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 612, - 617 - ], - "loc": { - "start": { - "line": 32, - "column": 36 - }, - "end": { - "line": 32, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 591, - 611 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "frame", - "range": [ - 612, - 617 - ], - "loc": { - "start": { - "line": 32, - "column": 36 - }, - "end": { - "line": 32, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "frame", - "range": [ - 360, - 365 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 11 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 399, - 420 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "confetti", - "range": [ - 443, - 451 - ], - "loc": { - "start": { - "line": 23, - "column": 14 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "confetti", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 591, - 611 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "c", - "identifiers": [ - { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "confetti", - "range": [ - 753, - 761 - ], - "loc": { - "start": { - "line": 47, - "column": 7 - }, - "end": { - "line": 47, - "column": 15 - } - } - }, - "context": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 770, - 774 - ], - "loc": { - "start": { - "line": 48, - "column": 2 - }, - "end": { - "line": 48, - "column": 6 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 775, - 780 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 12 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "left: ", - "range": [ - 782, - 788 - ], - "loc": { - "start": { - "line": 48, - "column": 14 - }, - "end": { - "line": 48, - "column": 20 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "c", - "range": [ - 789, - 790 - ], - "loc": { - "start": { - "line": 48, - "column": 21 - }, - "end": { - "line": 48, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 791, - 792 - ], - "loc": { - "start": { - "line": 48, - "column": 23 - }, - "end": { - "line": 48, - "column": 24 - } - } - }, - "range": [ - 789, - 792 - ], - "loc": { - "start": { - "line": 48, - "column": 21 - }, - "end": { - "line": 48, - "column": 24 - } - } - }, - "range": [ - 788, - 793 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 25 - } - } - }, - { - "type": "SvelteLiteral", - "value": "%; top: ", - "range": [ - 793, - 801 - ], - "loc": { - "start": { - "line": 48, - "column": 25 - }, - "end": { - "line": 48, - "column": 33 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "c", - "range": [ - 802, - 803 - ], - "loc": { - "start": { - "line": 48, - "column": 34 - }, - "end": { - "line": 48, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 804, - 805 - ], - "loc": { - "start": { - "line": 48, - "column": 36 - }, - "end": { - "line": 48, - "column": 37 - } - } - }, - "range": [ - 802, - 805 - ], - "loc": { - "start": { - "line": 48, - "column": 34 - }, - "end": { - "line": 48, - "column": 37 - } - } - }, - "range": [ - 801, - 806 - ], - "loc": { - "start": { - "line": 48, - "column": 33 - }, - "end": { - "line": 48, - "column": 38 - } - } - }, - { - "type": "SvelteLiteral", - "value": "%; transform: scale(", - "range": [ - 806, - 826 - ], - "loc": { - "start": { - "line": 48, - "column": 38 - }, - "end": { - "line": 48, - "column": 58 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "c", - "range": [ - 827, - 828 - ], - "loc": { - "start": { - "line": 48, - "column": 59 - }, - "end": { - "line": 48, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "r", - "range": [ - 829, - 830 - ], - "loc": { - "start": { - "line": 48, - "column": 61 - }, - "end": { - "line": 48, - "column": 62 - } - } - }, - "range": [ - 827, - 830 - ], - "loc": { - "start": { - "line": 48, - "column": 59 - }, - "end": { - "line": 48, - "column": 62 - } - } - }, - "range": [ - 826, - 831 - ], - "loc": { - "start": { - "line": 48, - "column": 58 - }, - "end": { - "line": 48, - "column": 63 - } - } - }, - { - "type": "SvelteLiteral", - "value": ")", - "range": [ - 831, - 832 - ], - "loc": { - "start": { - "line": 48, - "column": 63 - }, - "end": { - "line": 48, - "column": 64 - } - } - } - ], - "range": [ - 775, - 833 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 65 - } - } - } - ], - "selfClosing": false, - "range": [ - 769, - 834 - ], - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 66 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "c", - "range": [ - 835, - 836 - ], - "loc": { - "start": { - "line": 48, - "column": 67 - }, - "end": { - "line": 48, - "column": 68 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "character", - "range": [ - 837, - 846 - ], - "loc": { - "start": { - "line": 48, - "column": 69 - }, - "end": { - "line": 48, - "column": 78 - } - } - }, - "range": [ - 835, - 846 - ], - "loc": { - "start": { - "line": 48, - "column": 67 - }, - "end": { - "line": 48, - "column": 78 - } - } - }, - "range": [ - 834, - 847 - ], - "loc": { - "start": { - "line": 48, - "column": 66 - }, - "end": { - "line": 48, - "column": 79 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 847, - 854 - ], - "loc": { - "start": { - "line": 48, - "column": 79 - }, - "end": { - "line": 48, - "column": 86 - } - } - }, - "range": [ - 769, - 854 - ], - "loc": { - "start": { - "line": 48, - "column": 1 - }, - "end": { - "line": 48, - "column": 86 - } - } - } - ], - "else": null, - "range": [ - 746, - 862 - ], - "loc": { - "start": { - "line": 47, - "column": 0 - }, - "end": { - "line": 49, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 789, - 790 - ], - "loc": { - "start": { - "line": 48, - "column": 21 - }, - "end": { - "line": 48, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 802, - 803 - ], - "loc": { - "start": { - "line": 48, - "column": 34 - }, - "end": { - "line": 48, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 827, - 828 - ], - "loc": { - "start": { - "line": 48, - "column": 59 - }, - "end": { - "line": 48, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 835, - 836 - ], - "loc": { - "start": { - "line": 48, - "column": 67 - }, - "end": { - "line": 48, - "column": 68 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 789, - 790 - ], - "loc": { - "start": { - "line": 48, - "column": 21 - }, - "end": { - "line": 48, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 802, - 803 - ], - "loc": { - "start": { - "line": 48, - "column": 34 - }, - "end": { - "line": 48, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 827, - 828 - ], - "loc": { - "start": { - "line": 48, - "column": 59 - }, - "end": { - "line": 48, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "c", - "range": [ - 835, - 836 - ], - "loc": { - "start": { - "line": 48, - "column": 67 - }, - "end": { - "line": 48, - "column": 68 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "c", - "range": [ - 765, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 19 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Array", - "range": [ - 103, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 399, - 420 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 591, - 611 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Array", - "range": [ - 103, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 209, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 243, - 247 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 277, - 281 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "requestAnimationFrame", - "range": [ - 399, - 420 - ], - "loc": { - "start": { - "line": 21, - "column": 11 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cancelAnimationFrame", - "range": [ - 591, - 611 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json index 8a66d688..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,360 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "html", - "identifiers": [ - { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'

Write some text!

'", - "value": "

Write some text!

", - "range": [ - 21, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 37 - } - } - }, - "range": [ - 14, - 46 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 37 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 103, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 44 - }, - "end": { - "line": 5, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 123, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 103, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 44 - }, - "end": { - "line": 5, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "html", - "range": [ - 123, - 127 - ], - "loc": { - "start": { - "line": 7, - "column": 6 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "html", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json index dc8fee14..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,744 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Map", - "identifiers": [ - { - "type": "Identifier", - "name": "Map", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Map", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Map", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Map", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Map", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - }, - { - "name": "MapMarker", - "identifiers": [ - { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - }, - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 136, - 145 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 208, - 217 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 291, - 300 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 363, - 372 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 448, - 457 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 517, - 526 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 136, - 145 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 208, - 217 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 291, - 300 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 363, - 372 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 448, - 457 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 517, - 526 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "MapMarker", - "range": [ - 50, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Map", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Map", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json index 9b752a12..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3651 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onMount", - "identifiers": [ - { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 227, - 234 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "setContext", - "identifiers": [ - { - "type": "Identifier", - "name": "setContext", - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "setContext", - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "setContext", - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "local": { - "type": "Identifier", - "name": "setContext", - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "setContext", - "range": [ - 102, - 112 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "setContext", - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - } - ] - }, - { - "name": "mapbox", - "identifiers": [ - { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "local": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 419, - 425 - ], - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ] - }, - { - "name": "key", - "identifiers": [ - { - "type": "Identifier", - "name": "key", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "key", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "key", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "local": { - "type": "Identifier", - "name": "key", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - }, - { - "name": "lat", - "identifiers": [ - { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "init": null, - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 513, - 516 - ], - "loc": { - "start": { - "line": 25, - "column": 18 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - } - ] - }, - { - "name": "lon", - "identifiers": [ - { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "init": null, - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 508, - 511 - ], - "loc": { - "start": { - "line": 25, - "column": 13 - }, - "end": { - "line": 25, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - } - ] - }, - { - "name": "zoom", - "identifiers": [ - { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "init": null, - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "zoom", - "range": [ - 523, - 527 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - } - ] - }, - { - "name": "container", - "identifiers": [ - { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "init": null, - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "container", - "range": [ - 436, - 445 - ], - "loc": { - "start": { - "line": 23, - "column": 4 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "container", - "range": [ - 745, - 754 - ], - "loc": { - "start": { - "line": 46, - "column": 16 - }, - "end": { - "line": 46, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - } - ] - }, - { - "name": "map", - "identifiers": [ - { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - }, - "init": null, - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 409, - 412 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 597, - 600 - ], - "loc": { - "start": { - "line": 33, - "column": 3 - }, - "end": { - "line": 33, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 763, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "setContext", - "range": [ - 102, - 112 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "setContext", - "range": [ - 28, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 113, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 74, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 227, - 234 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "container", - "range": [ - 745, - 754 - ], - "loc": { - "start": { - "line": 46, - "column": 16 - }, - "end": { - "line": 46, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 763, - 766 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "link", - "identifiers": [ - { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'link'", - "value": "link", - "range": [ - 281, - 287 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 17, - "column": 44 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "document", - "range": [ - 258, - 266 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "createElement", - "range": [ - 267, - 280 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 258, - 280 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "optional": false, - "range": [ - 258, - 288 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 45 - } - } - }, - "range": [ - 251, - 288 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 45 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 292, - 296 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 18, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 319, - 323 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 384, - 388 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 30, - "column": 28 - }, - "end": { - "line": 30, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 614, - 618 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 642, - 646 - ], - "loc": { - "start": { - "line": 34, - "column": 31 - }, - "end": { - "line": 34, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 258, - 266 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 292, - 296 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 18, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 319, - 323 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 384, - 388 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 543, - 551 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 30, - "column": 28 - }, - "end": { - "line": 30, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 409, - 412 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 419, - 425 - ], - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "container", - "range": [ - 436, - 445 - ], - "loc": { - "start": { - "line": 23, - "column": 4 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 508, - 511 - ], - "loc": { - "start": { - "line": 25, - "column": 13 - }, - "end": { - "line": 25, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 513, - 516 - ], - "loc": { - "start": { - "line": 25, - "column": 18 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "zoom", - "range": [ - 523, - 527 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 409, - 412 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 419, - 425 - ], - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "container", - "range": [ - 436, - 445 - ], - "loc": { - "start": { - "line": 23, - "column": 4 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 508, - 511 - ], - "loc": { - "start": { - "line": 25, - "column": 13 - }, - "end": { - "line": 25, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 513, - 516 - ], - "loc": { - "start": { - "line": 25, - "column": 18 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "zoom", - "range": [ - 523, - 527 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 597, - 600 - ], - "loc": { - "start": { - "line": 33, - "column": 3 - }, - "end": { - "line": 33, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 614, - 618 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 642, - 646 - ], - "loc": { - "start": { - "line": 34, - "column": 31 - }, - "end": { - "line": 34, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 597, - 600 - ], - "loc": { - "start": { - "line": 33, - "column": 3 - }, - "end": { - "line": 33, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 614, - 618 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "link", - "range": [ - 642, - 646 - ], - "loc": { - "start": { - "line": 34, - "column": 31 - }, - "end": { - "line": 34, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "link", - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 258, - 266 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 409, - 412 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 419, - 425 - ], - "loc": { - "start": { - "line": 22, - "column": 13 - }, - "end": { - "line": 22, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 66, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "container", - "range": [ - 436, - 445 - ], - "loc": { - "start": { - "line": 23, - "column": 4 - }, - "end": { - "line": 23, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "container", - "range": [ - 204, - 213 - ], - "loc": { - "start": { - "line": 13, - "column": 5 - }, - "end": { - "line": 13, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 508, - 511 - ], - "loc": { - "start": { - "line": 25, - "column": 13 - }, - "end": { - "line": 25, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 513, - 516 - ], - "loc": { - "start": { - "line": 25, - "column": 18 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 158, - 161 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "zoom", - "range": [ - 523, - 527 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "zoom", - "range": [ - 192, - 196 - ], - "loc": { - "start": { - "line": 11, - "column": 12 - }, - "end": { - "line": 11, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 543, - 551 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 597, - 600 - ], - "loc": { - "start": { - "line": 33, - "column": 3 - }, - "end": { - "line": 33, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 220, - 223 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 8 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 258, - 266 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 543, - 551 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 258, - 266 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 543, - 551 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json index 5ce8b58e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2857 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "getContext", - "identifiers": [ - { - "type": "Identifier", - "name": "getContext", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "getContext", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "getContext", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "local": { - "type": "Identifier", - "name": "getContext", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "getContext", - "range": [ - 112, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getContext", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "name": "mapbox", - "identifiers": [ - { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "local": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 226, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 295, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ] - }, - { - "name": "key", - "identifiers": [ - { - "type": "Identifier", - "name": "key", - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "key", - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "key", - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "local": { - "type": "Identifier", - "name": "key", - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 123, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - }, - { - "name": "getMap", - "identifiers": [ - { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "range": [ - 99, - 109 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "key", - "range": [ - 123, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getContext", - "range": [ - 112, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "optional": false, - "range": [ - 112, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - "range": [ - 99, - 127 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getMap", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "name": "map", - "identifiers": [ - { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "getMap", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 142, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 136, - 150 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 364, - 367 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - } - ] - }, - { - "name": "lat", - "identifiers": [ - { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "init": null, - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 330, - 333 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - } - ] - }, - { - "name": "lon", - "identifiers": [ - { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "init": null, - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 325, - 328 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - } - ] - }, - { - "name": "label", - "identifiers": [ - { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "init": null, - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "label", - "range": [ - 266, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - } - ] - }, - { - "name": "popup", - "identifiers": [ - { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "label", - "range": [ - 266, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 16 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "NewExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "offset", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 40 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "25", - "value": 25, - "range": [ - 249, - 251 - ], - "loc": { - "start": { - "line": 12, - "column": 42 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "range": [ - 241, - 251 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 44 - } - } - } - ], - "range": [ - 239, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 32 - }, - "end": { - "line": 12, - "column": 46 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 226, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "Popup", - "range": [ - 233, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 26 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 226, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "range": [ - 222, - 254 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 47 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "setText", - "range": [ - 258, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "range": [ - 222, - 265 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 13, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 222, - 272 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "range": [ - 214, - 272 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 13, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "popup", - "range": [ - 348, - 353 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - } - ] - }, - { - "name": "marker", - "identifiers": [ - { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "map", - "range": [ - 364, - 367 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 12 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "popup", - "range": [ - 348, - 353 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 17 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "lon", - "range": [ - 325, - 328 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - { - "type": "Identifier", - "name": "lat", - "range": [ - 330, - 333 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 22 - } - } - } - ], - "range": [ - 324, - 334 - ], - "loc": { - "start": { - "line": 16, - "column": 13 - }, - "end": { - "line": 16, - "column": 23 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "NewExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 295, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "Marker", - "range": [ - 302, - 308 - ], - "loc": { - "start": { - "line": 15, - "column": 27 - }, - "end": { - "line": 15, - "column": 33 - } - } - }, - "range": [ - 295, - 308 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 33 - } - } - }, - "range": [ - 291, - 310 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 15, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "setLngLat", - "range": [ - 314, - 323 - ], - "loc": { - "start": { - "line": 16, - "column": 3 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "range": [ - 291, - 323 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 291, - 335 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 16, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "setPopup", - "range": [ - 339, - 347 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "range": [ - 291, - 347 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "optional": false, - "range": [ - 291, - 354 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 17, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "addTo", - "range": [ - 358, - 363 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - "range": [ - 291, - 363 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 291, - 368 - ], - "loc": { - "start": { - "line": 15, - "column": 16 - }, - "end": { - "line": 18, - "column": 13 - } - } - }, - "range": [ - 282, - 368 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getContext", - "range": [ - 112, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getContext", - "range": [ - 19, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 123, - 126 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 65, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 18 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getMap", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "getMap", - "range": [ - 101, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 226, - 232 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "label", - "range": [ - 266, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "label", - "range": [ - 199, - 204 - ], - "loc": { - "start": { - "line": 10, - "column": 12 - }, - "end": { - "line": 10, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "marker", - "range": [ - 282, - 288 - ], - "loc": { - "start": { - "line": 15, - "column": 7 - }, - "end": { - "line": 15, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 295, - 301 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mapbox", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lon", - "range": [ - 325, - 328 - ], - "loc": { - "start": { - "line": 16, - "column": 14 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lon", - "range": [ - 182, - 185 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "lat", - "range": [ - 330, - 333 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "lat", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "popup", - "range": [ - 348, - 353 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "popup", - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "map", - "range": [ - 364, - 367 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "map", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json index c67b0d06..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,6679 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "fade", - "identifiers": [ - { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 81, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "opacity", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 81, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "operator": "+", - "prefix": true, - "range": [ - 80, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 76, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 43 - } - } - } - ], - "range": [ - 70, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 151, - 154 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "opacity: ", - "raw": "opacity: " - }, - "range": [ - 161, - 173 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 178, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 30 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 161, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - ], - "range": [ - 156, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 151, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 123, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "range": [ - 116, - 185 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 12, - "column": 4 - } - } - } - ], - "range": [ - 66, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 42, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "range": [ - 30, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - ], - "range": [ - 10, - 188 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 656, - 660 - ], - "loc": { - "start": { - "line": 46, - "column": 56 - }, - "end": { - "line": 46, - "column": 60 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 205, - 209 - ], - "loc": { - "start": { - "line": 15, - "column": 15 - }, - "end": { - "line": 15, - "column": 19 - } - } - }, - "range": [ - 195, - 209 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 557, - 564 - ], - "loc": { - "start": { - "line": 41, - "column": 38 - }, - "end": { - "line": 41, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 591, - 598 - ], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - } - ] - }, - { - "name": "spin", - "identifiers": [ - { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 276, - 279 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 9 - } - } - } - ], - "range": [ - 281, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "range": [ - 276, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 258, - 292 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 251, - 293 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 247, - 296 - ], - "loc": { - "start": { - "line": 17, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - } - ], - "range": [ - 233, - 245 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 33 - } - } - } - ], - "range": [ - 213, - 296 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "spin", - "range": [ - 626, - 630 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 557, - 564 - ], - "loc": { - "start": { - "line": 41, - "column": 38 - }, - "end": { - "line": 41, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 591, - 598 - ], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 195, - 202 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 81, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "opacity", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 81, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "operator": "+", - "prefix": true, - "range": [ - 80, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 76, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 43 - } - } - } - ], - "range": [ - 70, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 151, - 154 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "opacity: ", - "raw": "opacity: " - }, - "range": [ - 161, - 173 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 178, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 30 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 161, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - ], - "range": [ - 156, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 151, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 123, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "range": [ - 116, - 185 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 12, - "column": 4 - } - } - } - ], - "range": [ - 66, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 42, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "range": [ - 30, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - ], - "range": [ - 10, - 188 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "delay", - "identifiers": [ - { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 81, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "opacity", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 81, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "operator": "+", - "prefix": true, - "range": [ - 80, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 76, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 43 - } - } - } - ], - "range": [ - 70, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 151, - 154 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "opacity: ", - "raw": "opacity: " - }, - "range": [ - 161, - 173 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 178, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 30 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 161, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - ], - "range": [ - 156, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 151, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 123, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "range": [ - 116, - 185 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 12, - "column": 4 - } - } - } - ], - "range": [ - 66, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 42, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "range": [ - 30, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - ], - "range": [ - 10, - 188 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - } - ] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 81, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "opacity", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 81, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "operator": "+", - "prefix": true, - "range": [ - 80, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 76, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 43 - } - } - } - ], - "range": [ - 70, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 151, - 154 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "opacity: ", - "raw": "opacity: " - }, - "range": [ - 161, - 173 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 178, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 30 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 161, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - ], - "range": [ - 156, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "range": [ - 151, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 123, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "range": [ - 116, - 185 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 12, - "column": 4 - } - } - } - ], - "range": [ - 66, - 188 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "right": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 42, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "range": [ - 34, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "right": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 58, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 47, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "range": [ - 30, - 64 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - ], - "range": [ - 10, - 188 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 13, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - }, - { - "name": "o", - "identifiers": [ - { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 81, - 103 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "opacity", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 81, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "operator": "+", - "prefix": true, - "range": [ - 80, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - "range": [ - 76, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 43 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 24, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "delay", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "delay", - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 138, - 146 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "opacity: ", - "raw": "opacity: " - }, - "range": [ - 161, - 173 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 178, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 30 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - ], - "range": [ - 161, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - ], - "range": [ - 156, - 180 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 173, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 11, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 156, - 157 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "o", - "range": [ - 177, - 178 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "o", - "range": [ - 76, - 77 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 276, - 279 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 9 - } - } - } - ], - "range": [ - 281, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "range": [ - 276, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 258, - 292 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 251, - 293 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 247, - 296 - ], - "loc": { - "start": { - "line": 17, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - } - ], - "range": [ - 233, - 245 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 33 - } - } - } - ], - "range": [ - 213, - 296 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 276, - 279 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 9 - } - } - } - ], - "range": [ - 281, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "range": [ - 276, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 258, - 292 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 251, - 293 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 247, - 296 - ], - "loc": { - "start": { - "line": 17, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 227, - 231 - ], - "loc": { - "start": { - "line": 17, - "column": 15 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - } - ], - "range": [ - 233, - 245 - ], - "loc": { - "start": { - "line": 17, - "column": 21 - }, - "end": { - "line": 17, - "column": 33 - } - } - } - ], - "range": [ - 213, - 296 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 263, - 271 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 235, - 243 - ], - "loc": { - "start": { - "line": 17, - "column": 23 - }, - "end": { - "line": 17, - "column": 31 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 9 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - ], - "range": [ - 286, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 13 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 9 - } - } - } - ], - "range": [ - 281, - 288 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 15 - } - } - } - } - ], - "references": [] - } - ], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "spin", - "range": [ - 626, - 630 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 656, - 660 - ], - "loc": { - "start": { - "line": 46, - "column": 56 - }, - "end": { - "line": 46, - "column": 60 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "spin", - "range": [ - 626, - 630 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spin", - "range": [ - 222, - 226 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 656, - 660 - ], - "loc": { - "start": { - "line": 46, - "column": 56 - }, - "end": { - "line": 46, - "column": 60 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 81, - 97 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json index a6ad99c6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,6572 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "fade", - "identifiers": [ - { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 803, - 807 - ], - "loc": { - "start": { - "line": 46, - "column": 56 - }, - "end": { - "line": 46, - "column": 60 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "elasticOut", - "identifiers": [ - { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "local": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 113, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "range": [ - 103, - 117 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 704, - 711 - ], - "loc": { - "start": { - "line": 41, - "column": 38 - }, - "end": { - "line": 41, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 738, - 745 - ], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - } - ] - }, - { - "name": "spin", - "identifiers": [ - { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 184, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 214, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 206, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 31 - } - } - } - ], - "range": [ - 200, - 228 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "eased", - "range": [ - 267, - 272 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "eased", - "range": [ - 284, - 289 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1080", - "value": 1080, - "range": [ - 292, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 49 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "range": [ - 284, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 335, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "range": [ - 331, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 329, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 328, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 359, - 362 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 20 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 364, - 368 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 26 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 371, - 375 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 378, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 36 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 371, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 355, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "range": [ - 350, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 350, - 380 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 401, - 403 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 19 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 405, - 408 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 411, - 414 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 417, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 411, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 405, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 397, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 13 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "range": [ - 392, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 392, - 419 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 35 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: scale(", - "raw": "\n\t\t\t\t\ttransform: scale(" - }, - "range": [ - 241, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 14, - "column": 24 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ") rotate(", - "raw": ") rotate(" - }, - "range": [ - 272, - 284 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", - "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" - }, - "range": [ - 296, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 53 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ",\n\t\t\t\t\t\t", - "raw": ",\n\t\t\t\t\t\t" - }, - "range": [ - 339, - 350 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 17, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "%,\n\t\t\t\t\t\t", - "raw": "%,\n\t\t\t\t\t\t" - }, - "range": [ - 380, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "%\n\t\t\t\t\t);", - "raw": "%\n\t\t\t\t\t);" - }, - "range": [ - 419, - 430 - ], - "loc": { - "start": { - "line": 18, - "column": 35 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 241, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "range": [ - 234, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 194, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "range": [ - 189, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 184, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 166, - 439 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 159, - 440 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 155, - 443 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - } - ], - "range": [ - 141, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 33 - } - } - } - ], - "range": [ - 121, - 443 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "spin", - "range": [ - 773, - 777 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 704, - 711 - ], - "loc": { - "start": { - "line": 41, - "column": 38 - }, - "end": { - "line": 41, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 738, - 745 - ], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 103, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 184, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 214, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 206, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 31 - } - } - } - ], - "range": [ - 200, - 228 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "eased", - "range": [ - 267, - 272 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "eased", - "range": [ - 284, - 289 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1080", - "value": 1080, - "range": [ - 292, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 49 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "range": [ - 284, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 335, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "range": [ - 331, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 329, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 328, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 359, - 362 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 20 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 364, - 368 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 26 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 371, - 375 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 378, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 36 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 371, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 355, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "range": [ - 350, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 350, - 380 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 401, - 403 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 19 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 405, - 408 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 411, - 414 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 417, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 411, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 405, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 397, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 13 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "range": [ - 392, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 392, - 419 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 35 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: scale(", - "raw": "\n\t\t\t\t\ttransform: scale(" - }, - "range": [ - 241, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 14, - "column": 24 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ") rotate(", - "raw": ") rotate(" - }, - "range": [ - 272, - 284 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", - "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" - }, - "range": [ - 296, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 53 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ",\n\t\t\t\t\t\t", - "raw": ",\n\t\t\t\t\t\t" - }, - "range": [ - 339, - 350 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 17, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "%,\n\t\t\t\t\t\t", - "raw": "%,\n\t\t\t\t\t\t" - }, - "range": [ - 380, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "%\n\t\t\t\t\t);", - "raw": "%\n\t\t\t\t\t);" - }, - "range": [ - 419, - 430 - ], - "loc": { - "start": { - "line": 18, - "column": 35 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 241, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "range": [ - 234, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 194, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "range": [ - 189, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 184, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 166, - 439 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 159, - 440 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 155, - 443 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - } - ], - "range": [ - 141, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 33 - } - } - } - ], - "range": [ - 121, - 443 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 184, - 187 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 214, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 206, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 31 - } - } - } - ], - "range": [ - 200, - 228 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "eased", - "range": [ - 267, - 272 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "eased", - "range": [ - 284, - 289 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1080", - "value": 1080, - "range": [ - 292, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 49 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "range": [ - 284, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 335, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "range": [ - 331, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 329, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 328, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 359, - 362 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 20 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 364, - 368 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 26 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 371, - 375 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 378, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 36 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 371, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 355, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "range": [ - 350, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 350, - 380 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 401, - 403 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 19 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 405, - 408 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 411, - 414 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 417, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 411, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 405, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 397, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 13 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "range": [ - 392, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 392, - 419 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 35 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: scale(", - "raw": "\n\t\t\t\t\ttransform: scale(" - }, - "range": [ - 241, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 14, - "column": 24 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ") rotate(", - "raw": ") rotate(" - }, - "range": [ - 272, - 284 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", - "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" - }, - "range": [ - 296, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 53 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ",\n\t\t\t\t\t\t", - "raw": ",\n\t\t\t\t\t\t" - }, - "range": [ - 339, - 350 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 17, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "%,\n\t\t\t\t\t\t", - "raw": "%,\n\t\t\t\t\t\t" - }, - "range": [ - 380, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "%\n\t\t\t\t\t);", - "raw": "%\n\t\t\t\t\t);" - }, - "range": [ - 419, - 430 - ], - "loc": { - "start": { - "line": 18, - "column": 35 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 241, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "range": [ - 234, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 194, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "range": [ - 189, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "range": [ - 184, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - ], - "range": [ - 166, - 439 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 159, - 440 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - } - ], - "range": [ - 155, - 443 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 135, - 139 - ], - "loc": { - "start": { - "line": 7, - "column": 15 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - } - ], - "range": [ - 141, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 33 - } - } - } - ], - "range": [ - 121, - 443 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 171, - 179 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 143, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 31 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 214, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 206, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 31 - } - } - } - ], - "range": [ - 200, - 228 - ], - "loc": { - "start": { - "line": 11, - "column": 4 - }, - "end": { - "line": 11, - "column": 32 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "eased", - "range": [ - 267, - 272 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "eased", - "range": [ - 284, - 289 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "1080", - "value": 1080, - "range": [ - 292, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 49 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "range": [ - 284, - 296 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "360", - "value": 360, - "range": [ - 335, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "range": [ - 331, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 329, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 9 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 328, - 339 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 19 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "100", - "value": 100, - "range": [ - 359, - 362 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 20 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 364, - 368 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 26 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 371, - 375 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 33 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 378, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 36 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 371, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 29 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 22 - }, - "end": { - "line": 17, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 355, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "range": [ - 350, - 358 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 350, - 380 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 401, - 403 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 19 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 405, - 408 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "operator": "-", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 411, - 414 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 417, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 411, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 27 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "range": [ - 405, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 21 - }, - "end": { - "line": 18, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "min", - "range": [ - 397, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 13 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "range": [ - 392, - 400 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 392, - 419 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 35 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: scale(", - "raw": "\n\t\t\t\t\ttransform: scale(" - }, - "range": [ - 241, - 267 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 14, - "column": 24 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ") rotate(", - "raw": ") rotate(" - }, - "range": [ - 272, - 284 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 41 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t", - "raw": "deg);\n\t\t\t\t\tcolor: hsl(\n\t\t\t\t\t\t" - }, - "range": [ - 296, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 53 - }, - "end": { - "line": 16, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ",\n\t\t\t\t\t\t", - "raw": ",\n\t\t\t\t\t\t" - }, - "range": [ - 339, - 350 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 17, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "%,\n\t\t\t\t\t\t", - "raw": "%,\n\t\t\t\t\t\t" - }, - "range": [ - 380, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "%\n\t\t\t\t\t);", - "raw": "%\n\t\t\t\t\t);" - }, - "range": [ - 419, - 430 - ], - "loc": { - "start": { - "line": 18, - "column": 35 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 241, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 19, - "column": 8 - } - } - }, - "range": [ - 234, - 430 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 19, - "column": 8 - } - } - } - ], - "range": [ - 194, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 13 - }, - "end": { - "line": 20, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - ], - "range": [ - 189, - 435 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 20, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 378, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 36 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 417, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - } - ] - }, - { - "name": "eased", - "identifiers": [ - { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 214, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 206, - 227 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eased", - "range": [ - 267, - 272 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eased", - "range": [ - 284, - 289 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 225, - 226 - ], - "loc": { - "start": { - "line": 11, - "column": 29 - }, - "end": { - "line": 11, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eased", - "range": [ - 267, - 272 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eased", - "range": [ - 284, - 289 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eased", - "range": [ - 206, - 211 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 378, - 379 - ], - "loc": { - "start": { - "line": 17, - "column": 36 - }, - "end": { - "line": 17, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 417, - 418 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 18, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 189, - 190 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 214, - 224 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elasticOut", - "range": [ - 62, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "spin", - "range": [ - 773, - 777 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 803, - 807 - ], - "loc": { - "start": { - "line": 46, - "column": 56 - }, - "end": { - "line": 46, - "column": 60 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "spin", - "range": [ - 773, - 777 - ], - "loc": { - "start": { - "line": 46, - "column": 26 - }, - "end": { - "line": 46, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spin", - "range": [ - 130, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 803, - 807 - ], - "loc": { - "start": { - "line": 46, - "column": 56 - }, - "end": { - "line": 46, - "column": 60 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 392, - 396 - ], - "loc": { - "start": { - "line": 18, - "column": 8 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json index 4ad1f6b6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,8604 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 24, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 14, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 559, - 566 - ], - "loc": { - "start": { - "line": 28, - "column": 38 - }, - "end": { - "line": 28, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 593, - 600 - ], - "loc": { - "start": { - "line": 32, - "column": 5 - }, - "end": { - "line": 32, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "typewriter", - "identifiers": [ - { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 103, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 98, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 98, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 98, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 138, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 133, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 133, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 152, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 133, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 170, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 165, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 133, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 98, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 85, - 183 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 79, - 184 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ThrowStatement", - "argument": { - "type": "NewExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "This transition only works on elements with a single text node child", - "raw": "This transition only works on elements with a single text node child" - }, - "range": [ - 221, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 89 - } - } - } - ], - "range": [ - 221, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 89 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "range": [ - 211, - 292 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 90 - } - } - }, - "range": [ - 205, - 293 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 91 - } - } - } - ], - "range": [ - 200, - 297 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 192, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 188, - 297 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 314, - 318 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 319, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 314, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 307, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 31 - } - } - } - ], - "range": [ - 301, - 331 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 356, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "range": [ - 351, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 365, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 351, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 340, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 38 - } - } - } - ], - "range": [ - 334, - 371 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 400, - 404 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 435, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 430, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "range": [ - 430, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 428, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 427, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "range": [ - 423, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 33 - } - } - } - ], - "range": [ - 417, - 447 - ], - "loc": { - "start": { - "line": 20, - "column": 4 - }, - "end": { - "line": 20, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 457, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "range": [ - 452, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 482, - 483 - ], - "loc": { - "start": { - "line": 21, - "column": 34 - }, - "end": { - "line": 21, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 485, - 486 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 476, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "range": [ - 471, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 471, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 488 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 40 - } - } - } - ], - "range": [ - 411, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 14 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - ], - "range": [ - 406, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "range": [ - 400, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 22, - "column": 4 - } - } - } - ], - "range": [ - 382, - 497 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - "range": [ - 375, - 498 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 23, - "column": 4 - } - } - } - ], - "range": [ - 75, - 501 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 69, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 59, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - ], - "range": [ - 33, - 501 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 24, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 609, - 619 - ], - "loc": { - "start": { - "line": 33, - "column": 7 - }, - "end": { - "line": 33, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 559, - 566 - ], - "loc": { - "start": { - "line": 28, - "column": 38 - }, - "end": { - "line": 28, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 593, - 600 - ], - "loc": { - "start": { - "line": 32, - "column": 5 - }, - "end": { - "line": 32, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 103, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 98, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 98, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 98, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 138, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 133, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 133, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 152, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 133, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 170, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 165, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 133, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 98, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 85, - 183 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 79, - 184 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ThrowStatement", - "argument": { - "type": "NewExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "This transition only works on elements with a single text node child", - "raw": "This transition only works on elements with a single text node child" - }, - "range": [ - 221, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 89 - } - } - } - ], - "range": [ - 221, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 89 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "range": [ - 211, - 292 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 90 - } - } - }, - "range": [ - 205, - 293 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 91 - } - } - } - ], - "range": [ - 200, - 297 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 192, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 188, - 297 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 314, - 318 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 319, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 314, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 307, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 31 - } - } - } - ], - "range": [ - 301, - 331 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 356, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "range": [ - 351, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 365, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 351, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 340, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 38 - } - } - } - ], - "range": [ - 334, - 371 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 400, - 404 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 435, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 430, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "range": [ - 430, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 428, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 427, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "range": [ - 423, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 33 - } - } - } - ], - "range": [ - 417, - 447 - ], - "loc": { - "start": { - "line": 20, - "column": 4 - }, - "end": { - "line": 20, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 457, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "range": [ - 452, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 482, - 483 - ], - "loc": { - "start": { - "line": 21, - "column": 34 - }, - "end": { - "line": 21, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 485, - 486 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 476, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "range": [ - 471, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 471, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 488 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 40 - } - } - } - ], - "range": [ - 411, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 14 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - ], - "range": [ - 406, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "range": [ - 400, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 22, - "column": 4 - } - } - } - ], - "range": [ - 382, - 497 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - "range": [ - 375, - 498 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 23, - "column": 4 - } - } - } - ], - "range": [ - 75, - 501 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 69, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 59, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - ], - "range": [ - 33, - 501 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 24, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 314, - 318 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ] - }, - { - "name": "speed", - "identifiers": [ - { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 103, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 98, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 98, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 98, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 138, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 133, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 133, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 152, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 133, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 170, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 165, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 133, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 98, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 85, - 183 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - ], - "range": [ - 79, - 184 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 8, - "column": 4 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ThrowStatement", - "argument": { - "type": "NewExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "This transition only works on elements with a single text node child", - "raw": "This transition only works on elements with a single text node child" - }, - "range": [ - 221, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 89 - } - } - } - ], - "range": [ - 221, - 291 - ], - "loc": { - "start": { - "line": 11, - "column": 19 - }, - "end": { - "line": 11, - "column": 89 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "range": [ - 211, - 292 - ], - "loc": { - "start": { - "line": 11, - "column": 9 - }, - "end": { - "line": 11, - "column": 90 - } - } - }, - "range": [ - 205, - 293 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 91 - } - } - } - ], - "range": [ - 200, - 297 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "valid", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 192, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 6 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "range": [ - 188, - 297 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 12, - "column": 3 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 314, - 318 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 319, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 314, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 307, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 31 - } - } - } - ], - "range": [ - 301, - 331 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 356, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "range": [ - 351, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 365, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 351, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 340, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 38 - } - } - } - ], - "range": [ - 334, - 371 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 39 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "tick", - "range": [ - 400, - 404 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 435, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 430, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "range": [ - 430, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 428, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 427, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "range": [ - 423, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 33 - } - } - } - ], - "range": [ - 417, - 447 - ], - "loc": { - "start": { - "line": 20, - "column": 4 - }, - "end": { - "line": 20, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 457, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "range": [ - 452, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 482, - 483 - ], - "loc": { - "start": { - "line": 21, - "column": 34 - }, - "end": { - "line": 21, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 485, - 486 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 476, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "range": [ - 471, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 471, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 488 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 40 - } - } - } - ], - "range": [ - 411, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 14 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - ], - "range": [ - 406, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "range": [ - 400, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 22, - "column": 4 - } - } - } - ], - "range": [ - 382, - 497 - ], - "loc": { - "start": { - "line": 17, - "column": 9 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - "range": [ - 375, - 498 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 23, - "column": 4 - } - } - } - ], - "range": [ - 75, - 501 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "AssignmentPattern", - "left": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "right": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 69, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 37 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 39 - } - } - } - ], - "range": [ - 59, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - ], - "range": [ - 33, - 501 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 24, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 365, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - } - ] - }, - { - "name": "valid", - "identifiers": [ - { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "init": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 103, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 98, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 114, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 19 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 98, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 125, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "range": [ - 98, - 126 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 31 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "childNodes", - "range": [ - 138, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 133, - 148 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 149, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "range": [ - 133, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "nodeType", - "range": [ - 152, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "range": [ - 133, - 160 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "operator": "===", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "TEXT_NODE", - "range": [ - 170, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 40 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 165, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 133, - 179 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 98, - 179 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 7, - "column": 49 - } - } - }, - "range": [ - 85, - 183 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - } - ] - }, - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 314, - 318 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 319, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 314, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 31 - } - } - }, - "range": [ - 307, - 330 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - } - ] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "init": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 356, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "range": [ - 351, - 362 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 30 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "speed", - "range": [ - 365, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 351, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "range": [ - 340, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 98, - 102 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "valid", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 10, - "column": 7 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "valid", - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 314, - 318 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 351, - 355 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 365, - 370 - ], - "loc": { - "start": { - "line": 15, - "column": 33 - }, - "end": { - "line": 15, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 34 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 387, - 395 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 340, - 348 - ], - "loc": { - "start": { - "line": 15, - "column": 8 - }, - "end": { - "line": 15, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 435, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 430, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "range": [ - 430, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 428, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 427, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "range": [ - 423, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 33 - } - } - } - ], - "range": [ - 417, - 447 - ], - "loc": { - "start": { - "line": 20, - "column": 4 - }, - "end": { - "line": 20, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "textContent", - "range": [ - 457, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "range": [ - 452, - 468 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 482, - 483 - ], - "loc": { - "start": { - "line": 21, - "column": 34 - }, - "end": { - "line": 21, - "column": 35 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 485, - 486 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 476, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "range": [ - 471, - 481 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 471, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 487 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 39 - } - } - }, - "range": [ - 452, - 488 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 40 - } - } - } - ], - "range": [ - 411, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 14 - }, - "end": { - "line": 22, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - ], - "range": [ - 406, - 493 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 22, - "column": 4 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "UnaryExpression", - "argument": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 435, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 430, - 441 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "range": [ - 430, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 428, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "operator": "~", - "prefix": true, - "range": [ - 427, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "range": [ - 423, - 446 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 485, - 486 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 406, - 407 - ], - "loc": { - "start": { - "line": 19, - "column": 9 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 485, - 486 - ], - "loc": { - "start": { - "line": 21, - "column": 37 - }, - "end": { - "line": 21, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 430, - 434 - ], - "loc": { - "start": { - "line": 20, - "column": 17 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 452, - 456 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 53, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 471, - 475 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 307, - 311 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 609, - 619 - ], - "loc": { - "start": { - "line": 33, - "column": 7 - }, - "end": { - "line": 33, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 609, - 619 - ], - "loc": { - "start": { - "line": 33, - "column": 7 - }, - "end": { - "line": 33, - "column": 17 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "typewriter", - "range": [ - 42, - 52 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Node", - "range": [ - 165, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 35 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Error", - "range": [ - 215, - 220 - ], - "loc": { - "start": { - "line": 11, - "column": 13 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json index 32229d1a..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,439 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 108, - 113 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 154, - 159 - ], - "loc": { - "start": { - "line": 8, - "column": 18 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$count", - "range": [ - 76, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 108, - 113 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 154, - 159 - ], - "loc": { - "start": { - "line": 8, - "column": 18 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 200, - 205 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json index 4e878fb9..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,636 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "user", - "identifiers": [ - { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "firstname", - "range": [ - 25, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Ada'", - "value": "Ada", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 25, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "lastname", - "range": [ - 45, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Lovelace'", - "value": "Lovelace", - "range": [ - 55, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 45, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "range": [ - 21, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 5, - "column": 2 - } - } - }, - "range": [ - 14, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 100, - 104 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 100, - 104 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 179, - 183 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json index 3ec8116f..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,707 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "user", - "identifiers": [ - { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "firstname", - "range": [ - 25, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Ada'", - "value": "Ada", - "range": [ - 36, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 25, - 41 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "lastname", - "range": [ - 45, - 53 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Lovelace'", - "value": "Lovelace", - "range": [ - 55, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "range": [ - 45, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "range": [ - 21, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 5, - "column": 2 - } - } - }, - "range": [ - 14, - 68 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 5, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 100, - 104 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 100, - 104 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 161, - 165 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 167, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 14 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 184, - 188 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 167, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 14 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 167, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 14 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json index c31a8d5d..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Nested", - "identifiers": [ - { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 60, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 60, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json index 07c48bbc..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,222 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "answer", - "identifiers": [ - { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "init": null, - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 58, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 58, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json index c31a8d5d..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Nested", - "identifiers": [ - { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 60, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 60, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json index 0487c083..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,320 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "answer", - "identifiers": [ - { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "init": { - "type": "Literal", - "raw": "'a mystery'", - "value": "a mystery", - "range": [ - 30, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 32 - } - } - }, - "range": [ - 21, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 72, - 78 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 21, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json index f2f8b624..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,20900 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "quintOut", - "identifiers": [ - { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "crossfade", - "identifiers": [ - { - "type": "Identifier", - "name": "crossfade", - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "local": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 126, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ] - }, - { - "name": "send", - "identifiers": [ - { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ArrayPattern", - "elements": [ - { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "range": [ - 108, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 140, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "d", - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 169, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "range": [ - 165, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 155, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 155, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "range": [ - 150, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "range": [ - 140, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "fallback", - "range": [ - 178, - 186 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 220, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 212, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "range": [ - 206, - 243 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 305, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 61 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 299, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 294, - 296 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 271, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "range": [ - 265, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 285, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 41 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 253, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 70 - } - } - } - ], - "range": [ - 247, - 315 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 333, - 341 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 343, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 14 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "range": [ - 333, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 352, - 358 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "range": [ - 352, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 374, - 377 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 384, - 404 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 413, - 423 - ], - "loc": { - "start": { - "line": 16, - "column": 27 - }, - "end": { - "line": 16, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 38 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 445, - 452 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 384, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "range": [ - 379, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 374, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 327, - 457 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "range": [ - 320, - 458 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 201, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 20, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - } - ], - "range": [ - 186, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 20, - "column": 3 - } - } - }, - "range": [ - 178, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 20, - "column": 3 - } - } - } - ], - "range": [ - 136, - 465 - ], - "loc": { - "start": { - "line": 5, - "column": 35 - }, - "end": { - "line": 21, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 126, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 126, - 466 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 108, - 466 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 21, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1481, - 1485 - ], - "loc": { - "start": { - "line": 67, - "column": 8 - }, - "end": { - "line": 67, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1841, - 1845 - ], - "loc": { - "start": { - "line": 81, - "column": 8 - }, - "end": { - "line": 81, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - } - ] - }, - { - "name": "receive", - "identifiers": [ - { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ArrayPattern", - "elements": [ - { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "range": [ - 108, - 123 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 140, - 148 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "d", - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 169, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "range": [ - 165, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 155, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 155, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "range": [ - 150, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "range": [ - 140, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "fallback", - "range": [ - 178, - 186 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "method": true, - "shorthand": false, - "value": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 220, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 212, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "range": [ - 206, - 243 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 305, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 61 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 299, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 294, - 296 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 271, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "range": [ - 265, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 285, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 41 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 253, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 70 - } - } - } - ], - "range": [ - 247, - 315 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 333, - 341 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 343, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 14 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "range": [ - 333, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 352, - 358 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "range": [ - 352, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 374, - 377 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 384, - 404 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 413, - 423 - ], - "loc": { - "start": { - "line": 16, - "column": 27 - }, - "end": { - "line": 16, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 38 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 445, - 452 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 384, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "range": [ - 379, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 374, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 327, - 457 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "range": [ - 320, - 458 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 201, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 20, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - } - ], - "range": [ - 186, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 20, - "column": 3 - } - } - }, - "range": [ - 178, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 20, - "column": 3 - } - } - } - ], - "range": [ - 136, - 465 - ], - "loc": { - "start": { - "line": 5, - "column": 35 - }, - "end": { - "line": 21, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 126, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 126, - 466 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 108, - 466 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 21, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1446, - 1453 - ], - "loc": { - "start": { - "line": 66, - "column": 7 - }, - "end": { - "line": 66, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1806, - 1813 - ], - "loc": { - "start": { - "line": 80, - "column": 7 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ] - }, - { - "name": "uid", - "identifiers": [ - { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 480, - 481 - ], - "loc": { - "start": { - "line": 23, - "column": 11 - }, - "end": { - "line": 23, - "column": 12 - } - } - }, - "range": [ - 474, - 481 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 507, - 510 - ], - "loc": { - "start": { - "line": 26, - "column": 8 - }, - "end": { - "line": 26, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 569, - 572 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 639, - 642 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 699, - 702 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 758, - 761 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 820, - 823 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 924, - 927 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - } - ] - }, - { - "name": "todos", - "identifiers": [ - { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 503, - 505 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 507, - 510 - ], - "loc": { - "start": { - "line": 26, - "column": 8 - }, - "end": { - "line": 26, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 507, - 512 - ], - "loc": { - "start": { - "line": 26, - "column": 8 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - "range": [ - 503, - 512 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 26, - "column": 15 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 520, - 525 - ], - "loc": { - "start": { - "line": 26, - "column": 21 - }, - "end": { - "line": 26, - "column": 26 - } - } - }, - "range": [ - 514, - 525 - ], - "loc": { - "start": { - "line": 26, - "column": 15 - }, - "end": { - "line": 26, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 527, - 538 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 26, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'write some docs'", - "value": "write some docs", - "range": [ - 540, - 557 - ], - "loc": { - "start": { - "line": 26, - "column": 41 - }, - "end": { - "line": 26, - "column": 58 - } - } - }, - "range": [ - 527, - 557 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 26, - "column": 58 - } - } - } - ], - "range": [ - 501, - 559 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 60 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 565, - 567 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 569, - 572 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 569, - 574 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "range": [ - 565, - 574 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 576, - 580 - ], - "loc": { - "start": { - "line": 27, - "column": 15 - }, - "end": { - "line": 27, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 582, - 587 - ], - "loc": { - "start": { - "line": 27, - "column": 21 - }, - "end": { - "line": 27, - "column": 26 - } - } - }, - "range": [ - 576, - 587 - ], - "loc": { - "start": { - "line": 27, - "column": 15 - }, - "end": { - "line": 27, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 589, - 600 - ], - "loc": { - "start": { - "line": 27, - "column": 28 - }, - "end": { - "line": 27, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'start writing blog post'", - "value": "start writing blog post", - "range": [ - 602, - 627 - ], - "loc": { - "start": { - "line": 27, - "column": 41 - }, - "end": { - "line": 27, - "column": 66 - } - } - }, - "range": [ - 589, - 627 - ], - "loc": { - "start": { - "line": 27, - "column": 28 - }, - "end": { - "line": 27, - "column": 66 - } - } - } - ], - "range": [ - 563, - 629 - ], - "loc": { - "start": { - "line": 27, - "column": 2 - }, - "end": { - "line": 27, - "column": 68 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 635, - 637 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 639, - 642 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 639, - 644 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 13 - } - } - }, - "range": [ - 635, - 644 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 646, - 650 - ], - "loc": { - "start": { - "line": 28, - "column": 15 - }, - "end": { - "line": 28, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 652, - 656 - ], - "loc": { - "start": { - "line": 28, - "column": 21 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - "range": [ - 646, - 656 - ], - "loc": { - "start": { - "line": 28, - "column": 15 - }, - "end": { - "line": 28, - "column": 25 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 659, - 670 - ], - "loc": { - "start": { - "line": 28, - "column": 28 - }, - "end": { - "line": 28, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'buy some milk'", - "value": "buy some milk", - "range": [ - 672, - 687 - ], - "loc": { - "start": { - "line": 28, - "column": 41 - }, - "end": { - "line": 28, - "column": 56 - } - } - }, - "range": [ - 659, - 687 - ], - "loc": { - "start": { - "line": 28, - "column": 28 - }, - "end": { - "line": 28, - "column": 56 - } - } - } - ], - "range": [ - 633, - 689 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 58 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 695, - 697 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 699, - 702 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 699, - 704 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "range": [ - 695, - 704 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 706, - 710 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 712, - 717 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 26 - } - } - }, - "range": [ - 706, - 717 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 719, - 730 - ], - "loc": { - "start": { - "line": 29, - "column": 28 - }, - "end": { - "line": 29, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'mow the lawn'", - "value": "mow the lawn", - "range": [ - 732, - 746 - ], - "loc": { - "start": { - "line": 29, - "column": 41 - }, - "end": { - "line": 29, - "column": 55 - } - } - }, - "range": [ - 719, - 746 - ], - "loc": { - "start": { - "line": 29, - "column": 28 - }, - "end": { - "line": 29, - "column": 55 - } - } - } - ], - "range": [ - 693, - 748 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 57 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 754, - 756 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 758, - 761 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 758, - 763 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 13 - } - } - }, - "range": [ - 754, - 763 - ], - "loc": { - "start": { - "line": 30, - "column": 4 - }, - "end": { - "line": 30, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 765, - 769 - ], - "loc": { - "start": { - "line": 30, - "column": 15 - }, - "end": { - "line": 30, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 771, - 776 - ], - "loc": { - "start": { - "line": 30, - "column": 21 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - "range": [ - 765, - 776 - ], - "loc": { - "start": { - "line": 30, - "column": 15 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 778, - 789 - ], - "loc": { - "start": { - "line": 30, - "column": 28 - }, - "end": { - "line": 30, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'feed the turtle'", - "value": "feed the turtle", - "range": [ - 791, - 808 - ], - "loc": { - "start": { - "line": 30, - "column": 41 - }, - "end": { - "line": 30, - "column": 58 - } - } - }, - "range": [ - 778, - 808 - ], - "loc": { - "start": { - "line": 30, - "column": 28 - }, - "end": { - "line": 30, - "column": 58 - } - } - } - ], - "range": [ - 752, - 810 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 60 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 816, - 818 - ], - "loc": { - "start": { - "line": 31, - "column": 4 - }, - "end": { - "line": 31, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 820, - 823 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 820, - 825 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 13 - } - } - }, - "range": [ - 816, - 825 - ], - "loc": { - "start": { - "line": 31, - "column": 4 - }, - "end": { - "line": 31, - "column": 13 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 827, - 831 - ], - "loc": { - "start": { - "line": 31, - "column": 15 - }, - "end": { - "line": 31, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 833, - 838 - ], - "loc": { - "start": { - "line": 31, - "column": 21 - }, - "end": { - "line": 31, - "column": 26 - } - } - }, - "range": [ - 827, - 838 - ], - "loc": { - "start": { - "line": 31, - "column": 15 - }, - "end": { - "line": 31, - "column": 26 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 840, - 851 - ], - "loc": { - "start": { - "line": 31, - "column": 28 - }, - "end": { - "line": 31, - "column": 39 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'fix some bugs'", - "value": "fix some bugs", - "range": [ - 853, - 868 - ], - "loc": { - "start": { - "line": 31, - "column": 41 - }, - "end": { - "line": 31, - "column": 56 - } - } - }, - "range": [ - 840, - 868 - ], - "loc": { - "start": { - "line": 31, - "column": 28 - }, - "end": { - "line": 31, - "column": 56 - } - } - } - ], - "range": [ - 814, - 870 - ], - "loc": { - "start": { - "line": 31, - "column": 2 - }, - "end": { - "line": 31, - "column": 58 - } - } - } - ], - "range": [ - 497, - 874 - ], - "loc": { - "start": { - "line": 25, - "column": 13 - }, - "end": { - "line": 32, - "column": 2 - } - } - }, - "range": [ - 489, - 874 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 32, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 983, - 988 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1001, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 41, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1060, - 1065 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1068, - 1073 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1170, - 1175 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1178, - 1183 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1383, - 1388 - ], - "loc": { - "start": { - "line": 64, - "column": 9 - }, - "end": { - "line": 64, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1731, - 1736 - ], - "loc": { - "start": { - "line": 78, - "column": 9 - }, - "end": { - "line": 78, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - } - ] - }, - { - "name": "add", - "identifiers": [ - { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 920, - 922 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 924, - 927 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 10 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 924, - 929 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "range": [ - 920, - 929 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 934, - 938 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 940, - 945 - ], - "loc": { - "start": { - "line": 37, - "column": 9 - }, - "end": { - "line": 37, - "column": 14 - } - } - }, - "range": [ - 934, - 945 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 950, - 961 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 963, - 968 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 969, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 22 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 963, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 950, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 27 - } - } - } - ], - "range": [ - 915, - 978 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 39, - "column": 3 - } - } - }, - "range": [ - 908, - 978 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 39, - "column": 3 - } - } - } - ], - "range": [ - 902, - 979 - ], - "loc": { - "start": { - "line": 35, - "column": 2 - }, - "end": { - "line": 39, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 983, - 988 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 992, - 996 - ], - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - { - "type": "SpreadElement", - "argument": { - "type": "Identifier", - "name": "todos", - "range": [ - 1001, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 41, - "column": 25 - } - } - }, - "range": [ - 998, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 17 - }, - "end": { - "line": 41, - "column": 25 - } - } - } - ], - "range": [ - 991, - 1007 - ], - "loc": { - "start": { - "line": 41, - "column": 10 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - "range": [ - 983, - 1007 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - "range": [ - 983, - 1008 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 27 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1011, - 1016 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1017, - 1022 - ], - "loc": { - "start": { - "line": 42, - "column": 8 - }, - "end": { - "line": 42, - "column": 13 - } - } - }, - "range": [ - 1011, - 1022 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 1025, - 1027 - ], - "loc": { - "start": { - "line": 42, - "column": 16 - }, - "end": { - "line": 42, - "column": 18 - } - } - }, - "range": [ - 1011, - 1027 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 18 - } - } - }, - "range": [ - 1011, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 19 - } - } - } - ], - "range": [ - 898, - 1031 - ], - "loc": { - "start": { - "line": 34, - "column": 21 - }, - "end": { - "line": 43, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - ], - "range": [ - 878, - 1031 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 43, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 1319, - 1322 - ], - "loc": { - "start": { - "line": 59, - "column": 40 - }, - "end": { - "line": 59, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - } - } - ] - }, - { - "name": "remove", - "identifiers": [ - { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1060, - 1065 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 1086, - 1087 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 29 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "todo", - "range": [ - 1092, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 34 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "range": [ - 1086, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - } - ], - "range": [ - 1081, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1068, - 1073 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1074, - 1080 - ], - "loc": { - "start": { - "line": 46, - "column": 16 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "range": [ - 1068, - 1080 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1068, - 1097 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 39 - } - } - }, - "range": [ - 1060, - 1097 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 39 - } - } - }, - "range": [ - 1060, - 1098 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 40 - } - } - } - ], - "range": [ - 1056, - 1101 - ], - "loc": { - "start": { - "line": 45, - "column": 23 - }, - "end": { - "line": 47, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - } - ], - "range": [ - 1034, - 1101 - ], - "loc": { - "start": { - "line": 45, - "column": 1 - }, - "end": { - "line": 47, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1154, - 1160 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1623, - 1629 - ], - "loc": { - "start": { - "line": 71, - "column": 29 - }, - "end": { - "line": 71, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1988, - 1994 - ], - "loc": { - "start": { - "line": 84, - "column": 29 - }, - "end": { - "line": 84, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - } - ] - }, - { - "name": "mark", - "identifiers": [ - { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1139, - 1143 - ], - "loc": { - "start": { - "line": 50, - "column": 7 - }, - "end": { - "line": 50, - "column": 11 - } - } - }, - "range": [ - 1134, - 1143 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "done", - "range": [ - 1146, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 14 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "range": [ - 1134, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "range": [ - 1134, - 1151 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1161, - 1165 - ], - "loc": { - "start": { - "line": 51, - "column": 9 - }, - "end": { - "line": 51, - "column": 13 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1154, - 1160 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 1154, - 1166 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 14 - } - } - }, - "range": [ - 1154, - 1167 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1170, - 1175 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1191, - 1195 - ], - "loc": { - "start": { - "line": 52, - "column": 23 - }, - "end": { - "line": 52, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1178, - 1183 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 1184, - 1190 - ], - "loc": { - "start": { - "line": 52, - "column": 16 - }, - "end": { - "line": 52, - "column": 22 - } - } - }, - "range": [ - 1178, - 1190 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1178, - 1196 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "range": [ - 1170, - 1196 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "range": [ - 1170, - 1197 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 29 - } - } - } - ], - "range": [ - 1130, - 1200 - ], - "loc": { - "start": { - "line": 49, - "column": 27 - }, - "end": { - "line": 53, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - } - ], - "range": [ - 1104, - 1200 - ], - "loc": { - "start": { - "line": 49, - "column": 1 - }, - "end": { - "line": 53, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1552, - 1556 - ], - "loc": { - "start": { - "line": 69, - "column": 42 - }, - "end": { - "line": 69, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1916, - 1920 - ], - "loc": { - "start": { - "line": 82, - "column": 50 - }, - "end": { - "line": 82, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 126, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "crossfade", - "range": [ - 62, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 507, - 510 - ], - "loc": { - "start": { - "line": 26, - "column": 8 - }, - "end": { - "line": 26, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 569, - 572 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 639, - 642 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 699, - 702 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 758, - 761 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 820, - 823 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1383, - 1388 - ], - "loc": { - "start": { - "line": 64, - "column": 9 - }, - "end": { - "line": 64, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1731, - 1736 - ], - "loc": { - "start": { - "line": 78, - "column": 9 - }, - "end": { - "line": 78, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "d", - "identifiers": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "d", - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 169, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 31 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "range": [ - 165, - 172 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "sqrt", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 22 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 155, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 155, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "range": [ - 150, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "d", - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "d", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "node", - "identifiers": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "node": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 220, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 212, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "range": [ - 206, - 243 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 305, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 61 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 299, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 294, - 296 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 271, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "range": [ - 265, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 285, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 41 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 253, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 70 - } - } - } - ], - "range": [ - 247, - 315 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 333, - 341 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 343, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 14 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "range": [ - 333, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 352, - 358 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "range": [ - 352, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 374, - 377 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 384, - 404 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 413, - 423 - ], - "loc": { - "start": { - "line": 16, - "column": 27 - }, - "end": { - "line": 16, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 38 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 445, - 452 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 384, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "range": [ - 379, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 374, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 327, - 457 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "range": [ - 320, - 458 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 201, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 20, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - } - ], - "range": [ - 186, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 20, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - } - ] - }, - { - "name": "params", - "identifiers": [ - { - "type": "Identifier", - "name": "params", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "params", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "node": { - "type": "FunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 220, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 212, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - ], - "range": [ - 206, - 243 - ], - "loc": { - "start": { - "line": 9, - "column": 3 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 305, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 61 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 299, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 294, - 296 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 271, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "range": [ - 265, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 285, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 41 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 253, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 70 - } - } - } - ], - "range": [ - 247, - 315 - ], - "loc": { - "start": { - "line": 10, - "column": 3 - }, - "end": { - "line": 10, - "column": 71 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 333, - 341 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "600", - "value": 600, - "range": [ - 343, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 14 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "range": [ - 333, - 346 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 352, - 358 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "range": [ - 352, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "css", - "range": [ - 374, - 377 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 384, - 404 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 413, - 423 - ], - "loc": { - "start": { - "line": 16, - "column": 27 - }, - "end": { - "line": 16, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 38 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 445, - 452 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 384, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "range": [ - 379, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 374, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 4 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 327, - 457 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "range": [ - 320, - 458 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 5 - } - } - } - ], - "range": [ - 201, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 20, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - { - "type": "Identifier", - "name": "params", - "range": [ - 193, - 199 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - } - ], - "range": [ - 186, - 462 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 20, - "column": 3 - } - } - } - } - ], - "references": [] - }, - { - "name": "style", - "identifiers": [ - { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "optional": false, - "range": [ - 220, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 39 - } - } - }, - "range": [ - 212, - 242 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 39 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - } - ] - }, - { - "name": "transform", - "identifiers": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 305, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 61 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 299, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "consequent": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 294, - 296 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 52 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 271, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 27 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "range": [ - 265, - 280 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'none'", - "value": "none", - "range": [ - 285, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 41 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 291 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "range": [ - 265, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 70 - } - } - }, - "range": [ - 253, - 314 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 70 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "node", - "range": [ - 237, - 241 - ], - "loc": { - "start": { - "line": 9, - "column": 34 - }, - "end": { - "line": 9, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "node", - "range": [ - 187, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 21 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "style", - "range": [ - 299, - 304 - ], - "loc": { - "start": { - "line": 10, - "column": 55 - }, - "end": { - "line": 10, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 9, - "column": 9 - }, - "end": { - "line": 9, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "\n\t\t\t\t\ttransform: ", - "raw": "\n\t\t\t\t\ttransform: " - }, - "range": [ - 384, - 404 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 16, - "column": 18 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " scale(", - "raw": " scale(" - }, - "range": [ - 413, - 423 - ], - "loc": { - "start": { - "line": 16, - "column": 27 - }, - "end": { - "line": 16, - "column": 37 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ");\n\t\t\t\t\topacity: ", - "raw": ");\n\t\t\t\t\topacity: " - }, - "range": [ - 424, - 444 - ], - "loc": { - "start": { - "line": 16, - "column": 38 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\n\t\t\t\t", - "raw": "\n\t\t\t\t" - }, - "range": [ - 445, - 452 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - ], - "range": [ - 384, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - ], - "range": [ - 379, - 452 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 18, - "column": 5 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 423, - 424 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 444, - 445 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 379, - 380 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "transform", - "range": [ - 404, - 413 - ], - "loc": { - "start": { - "line": 16, - "column": 18 - }, - "end": { - "line": 16, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "transform", - "range": [ - 253, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 9 - }, - "end": { - "line": 10, - "column": 18 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 360, - 368 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "quintOut", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "input", - "identifiers": [ - { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 920, - 922 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 924, - 927 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 10 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 924, - 929 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "range": [ - 920, - 929 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 934, - 938 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 940, - 945 - ], - "loc": { - "start": { - "line": 37, - "column": 9 - }, - "end": { - "line": 37, - "column": 14 - } - } - }, - "range": [ - 934, - 945 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 950, - 961 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 963, - 968 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 969, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 22 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 963, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 950, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 27 - } - } - } - ], - "range": [ - 915, - 978 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 39, - "column": 3 - } - } - }, - "range": [ - 908, - 978 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 39, - "column": 3 - } - } - } - ], - "range": [ - 902, - 979 - ], - "loc": { - "start": { - "line": 35, - "column": 2 - }, - "end": { - "line": 39, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 983, - 988 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 992, - 996 - ], - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - { - "type": "SpreadElement", - "argument": { - "type": "Identifier", - "name": "todos", - "range": [ - 1001, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 41, - "column": 25 - } - } - }, - "range": [ - 998, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 17 - }, - "end": { - "line": 41, - "column": 25 - } - } - } - ], - "range": [ - 991, - 1007 - ], - "loc": { - "start": { - "line": 41, - "column": 10 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - "range": [ - 983, - 1007 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 26 - } - } - }, - "range": [ - 983, - 1008 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 27 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 1011, - 1016 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 1017, - 1022 - ], - "loc": { - "start": { - "line": 42, - "column": 8 - }, - "end": { - "line": 42, - "column": 13 - } - } - }, - "range": [ - 1011, - 1022 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 1025, - 1027 - ], - "loc": { - "start": { - "line": 42, - "column": 16 - }, - "end": { - "line": 42, - "column": 18 - } - } - }, - "range": [ - 1011, - 1027 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 18 - } - } - }, - "range": [ - 1011, - 1028 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 19 - } - } - } - ], - "range": [ - 898, - 1031 - ], - "loc": { - "start": { - "line": 34, - "column": 21 - }, - "end": { - "line": 43, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - ], - "range": [ - 878, - 1031 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 43, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 963, - 968 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 1011, - 1016 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - } - ] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 920, - 922 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 5 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UpdateExpression", - "argument": { - "type": "Identifier", - "name": "uid", - "range": [ - 924, - 927 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 10 - } - } - }, - "operator": "++", - "prefix": false, - "range": [ - 924, - 929 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - "range": [ - 920, - 929 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 934, - 938 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 940, - 945 - ], - "loc": { - "start": { - "line": 37, - "column": 9 - }, - "end": { - "line": 37, - "column": 14 - } - } - }, - "range": [ - 934, - 945 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "description", - "range": [ - 950, - 961 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 14 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "input", - "range": [ - 963, - 968 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 969, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 22 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 963, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 950, - 974 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 27 - } - } - } - ], - "range": [ - 915, - 978 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 39, - "column": 3 - } - } - }, - "range": [ - 908, - 978 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 39, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 992, - 996 - ], - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 924, - 927 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 963, - 968 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 983, - 988 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 992, - 996 - ], - "loc": { - "start": { - "line": 41, - "column": 11 - }, - "end": { - "line": 41, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 908, - 912 - ], - "loc": { - "start": { - "line": 35, - "column": 8 - }, - "end": { - "line": 35, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1001, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 41, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "input", - "range": [ - 1011, - 1016 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 42, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "input", - "range": [ - 891, - 896 - ], - "loc": { - "start": { - "line": 34, - "column": 14 - }, - "end": { - "line": 34, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "uid", - "range": [ - 924, - 927 - ], - "loc": { - "start": { - "line": 36, - "column": 7 - }, - "end": { - "line": 36, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "uid", - "range": [ - 474, - 477 - ], - "loc": { - "start": { - "line": 23, - "column": 5 - }, - "end": { - "line": 23, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 983, - 988 - ], - "loc": { - "start": { - "line": 41, - "column": 2 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1001, - 1006 - ], - "loc": { - "start": { - "line": 41, - "column": 20 - }, - "end": { - "line": 41, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1060, - 1065 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 1086, - 1087 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 29 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "todo", - "range": [ - 1092, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 34 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "range": [ - 1086, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - } - ], - "range": [ - 1081, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 38 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1068, - 1073 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1074, - 1080 - ], - "loc": { - "start": { - "line": 46, - "column": 16 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "range": [ - 1068, - 1080 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1068, - 1097 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 39 - } - } - }, - "range": [ - 1060, - 1097 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 39 - } - } - }, - "range": [ - 1060, - 1098 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 40 - } - } - } - ], - "range": [ - 1056, - 1101 - ], - "loc": { - "start": { - "line": 45, - "column": 23 - }, - "end": { - "line": 47, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - } - ], - "range": [ - 1034, - 1101 - ], - "loc": { - "start": { - "line": 45, - "column": 1 - }, - "end": { - "line": 47, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1092, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 34 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1060, - 1065 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1068, - 1073 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 1086, - 1087 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 29 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "todo", - "range": [ - 1092, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 34 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "range": [ - 1086, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - } - ], - "range": [ - 1081, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1086, - 1087 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1086, - 1087 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1081, - 1082 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1092, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 34 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1092, - 1096 - ], - "loc": { - "start": { - "line": 46, - "column": 34 - }, - "end": { - "line": 46, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1050, - 1054 - ], - "loc": { - "start": { - "line": 45, - "column": 17 - }, - "end": { - "line": 45, - "column": 21 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1060, - 1065 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1068, - 1073 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1139, - 1143 - ], - "loc": { - "start": { - "line": 50, - "column": 7 - }, - "end": { - "line": 50, - "column": 11 - } - } - }, - "range": [ - 1134, - 1143 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "done", - "range": [ - 1146, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 14 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "range": [ - 1134, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "range": [ - 1134, - 1151 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1161, - 1165 - ], - "loc": { - "start": { - "line": 51, - "column": 9 - }, - "end": { - "line": 51, - "column": 13 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1154, - 1160 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 1154, - 1166 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 14 - } - } - }, - "range": [ - 1154, - 1167 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1170, - 1175 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1191, - 1195 - ], - "loc": { - "start": { - "line": 52, - "column": 23 - }, - "end": { - "line": 52, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1178, - 1183 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 1184, - 1190 - ], - "loc": { - "start": { - "line": 52, - "column": 16 - }, - "end": { - "line": 52, - "column": 22 - } - } - }, - "range": [ - 1178, - 1190 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1178, - 1196 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "range": [ - 1170, - 1196 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "range": [ - 1170, - 1197 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 29 - } - } - } - ], - "range": [ - 1130, - 1200 - ], - "loc": { - "start": { - "line": 49, - "column": 27 - }, - "end": { - "line": 53, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - } - ], - "range": [ - 1104, - 1200 - ], - "loc": { - "start": { - "line": 49, - "column": 1 - }, - "end": { - "line": 53, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1161, - 1165 - ], - "loc": { - "start": { - "line": 51, - "column": 9 - }, - "end": { - "line": 51, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1191, - 1195 - ], - "loc": { - "start": { - "line": 52, - "column": 23 - }, - "end": { - "line": 52, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - } - ] - }, - { - "name": "done", - "identifiers": [ - { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1139, - 1143 - ], - "loc": { - "start": { - "line": 50, - "column": 7 - }, - "end": { - "line": 50, - "column": 11 - } - } - }, - "range": [ - 1134, - 1143 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "done", - "range": [ - 1146, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 14 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "range": [ - 1134, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "range": [ - 1134, - 1151 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1161, - 1165 - ], - "loc": { - "start": { - "line": 51, - "column": 9 - }, - "end": { - "line": 51, - "column": 13 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1154, - 1160 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 8 - } - } - }, - "optional": false, - "range": [ - 1154, - 1166 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 14 - } - } - }, - "range": [ - 1154, - 1167 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 1170, - 1175 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1191, - 1195 - ], - "loc": { - "start": { - "line": 52, - "column": 23 - }, - "end": { - "line": 52, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1178, - 1183 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 1184, - 1190 - ], - "loc": { - "start": { - "line": 52, - "column": 16 - }, - "end": { - "line": 52, - "column": 22 - } - } - }, - "range": [ - 1178, - 1190 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1178, - 1196 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "range": [ - 1170, - 1196 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 28 - } - } - }, - "range": [ - 1170, - 1197 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 29 - } - } - } - ], - "range": [ - 1130, - 1200 - ], - "loc": { - "start": { - "line": 49, - "column": 27 - }, - "end": { - "line": 53, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - } - ], - "range": [ - 1104, - 1200 - ], - "loc": { - "start": { - "line": 49, - "column": 1 - }, - "end": { - "line": 53, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "done", - "range": [ - 1146, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 14 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1134, - 1138 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "done", - "range": [ - 1146, - 1150 - ], - "loc": { - "start": { - "line": 50, - "column": 14 - }, - "end": { - "line": 50, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "done", - "range": [ - 1124, - 1128 - ], - "loc": { - "start": { - "line": 49, - "column": 21 - }, - "end": { - "line": 49, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1154, - 1160 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1161, - 1165 - ], - "loc": { - "start": { - "line": 51, - "column": 9 - }, - "end": { - "line": 51, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1170, - 1175 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1178, - 1183 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1191, - 1195 - ], - "loc": { - "start": { - "line": 52, - "column": 23 - }, - "end": { - "line": 52, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1118, - 1122 - ], - "loc": { - "start": { - "line": 49, - "column": 15 - }, - "end": { - "line": 49, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1154, - 1160 - ], - "loc": { - "start": { - "line": 51, - "column": 2 - }, - "end": { - "line": 51, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1170, - 1175 - ], - "loc": { - "start": { - "line": 52, - "column": 2 - }, - "end": { - "line": 52, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 1178, - 1183 - ], - "loc": { - "start": { - "line": 52, - "column": 10 - }, - "end": { - "line": 52, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 489, - 494 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "LogicalExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 1298, - 1299 - ], - "loc": { - "start": { - "line": 59, - "column": 19 - }, - "end": { - "line": 59, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 1300, - 1303 - ], - "loc": { - "start": { - "line": 59, - "column": 21 - }, - "end": { - "line": 59, - "column": 24 - } - } - }, - "range": [ - 1298, - 1303 - ], - "loc": { - "start": { - "line": 59, - "column": 19 - }, - "end": { - "line": 59, - "column": 24 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'Enter'", - "value": "Enter", - "range": [ - 1308, - 1315 - ], - "loc": { - "start": { - "line": 59, - "column": 29 - }, - "end": { - "line": 59, - "column": 36 - } - } - }, - "range": [ - 1298, - 1315 - ], - "loc": { - "start": { - "line": 59, - "column": 19 - }, - "end": { - "line": 59, - "column": 36 - } - } - }, - "operator": "&&", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 1323, - 1324 - ], - "loc": { - "start": { - "line": 59, - "column": 44 - }, - "end": { - "line": 59, - "column": 45 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 1325, - 1331 - ], - "loc": { - "start": { - "line": 59, - "column": 46 - }, - "end": { - "line": 59, - "column": 52 - } - } - }, - "range": [ - 1323, - 1331 - ], - "loc": { - "start": { - "line": 59, - "column": 44 - }, - "end": { - "line": 59, - "column": 52 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "add", - "range": [ - 1319, - 1322 - ], - "loc": { - "start": { - "line": 59, - "column": 40 - }, - "end": { - "line": 59, - "column": 43 - } - } - }, - "optional": false, - "range": [ - 1319, - 1332 - ], - "loc": { - "start": { - "line": 59, - "column": 40 - }, - "end": { - "line": 59, - "column": 53 - } - } - }, - "range": [ - 1298, - 1332 - ], - "loc": { - "start": { - "line": 59, - "column": 19 - }, - "end": { - "line": 59, - "column": 53 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - } - ], - "range": [ - 1293, - 1332 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 53 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1298, - 1299 - ], - "loc": { - "start": { - "line": 59, - "column": 19 - }, - "end": { - "line": 59, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1323, - 1324 - ], - "loc": { - "start": { - "line": 59, - "column": 44 - }, - "end": { - "line": 59, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1298, - 1299 - ], - "loc": { - "start": { - "line": 59, - "column": 19 - }, - "end": { - "line": 59, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 1319, - 1322 - ], - "loc": { - "start": { - "line": 59, - "column": 40 - }, - "end": { - "line": 59, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 1323, - 1324 - ], - "loc": { - "start": { - "line": 59, - "column": 44 - }, - "end": { - "line": 59, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 1293, - 1294 - ], - "loc": { - "start": { - "line": 59, - "column": 14 - }, - "end": { - "line": 59, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 1319, - 1322 - ], - "loc": { - "start": { - "line": 59, - "column": 40 - }, - "end": { - "line": 59, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 887, - 890 - ], - "loc": { - "start": { - "line": 34, - "column": 10 - }, - "end": { - "line": 34, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1396, - 1397 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 1396, - 1397 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1402, - 1403 - ], - "loc": { - "start": { - "line": 64, - "column": 28 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1404, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 30 - }, - "end": { - "line": 64, - "column": 34 - } - } - }, - "range": [ - 1402, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 28 - }, - "end": { - "line": 64, - "column": 34 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 1401, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 27 - }, - "end": { - "line": 64, - "column": 34 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1396, - 1397 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 23 - } - } - } - ], - "range": [ - 1396, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 34 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1402, - 1403 - ], - "loc": { - "start": { - "line": 64, - "column": 28 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1396, - 1397 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1402, - 1403 - ], - "loc": { - "start": { - "line": 64, - "column": 28 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1396, - 1397 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1402, - 1403 - ], - "loc": { - "start": { - "line": 64, - "column": 28 - }, - "end": { - "line": 64, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1404, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 30 - }, - "end": { - "line": 64, - "column": 34 - } - } - }, - "range": [ - 1402, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 28 - }, - "end": { - "line": 64, - "column": 34 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 1401, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 27 - }, - "end": { - "line": 64, - "column": 34 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1396, - 1397 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 23 - } - } - } - ], - "range": [ - 1396, - 1408 - ], - "loc": { - "start": { - "line": 64, - "column": 22 - }, - "end": { - "line": 64, - "column": 34 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1383, - 1388 - ], - "loc": { - "start": { - "line": 64, - "column": 9 - }, - "end": { - "line": 64, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1389, - 1395 - ], - "loc": { - "start": { - "line": 64, - "column": 15 - }, - "end": { - "line": 64, - "column": 21 - } - } - }, - "range": [ - 1383, - 1395 - ], - "loc": { - "start": { - "line": 64, - "column": 9 - }, - "end": { - "line": 64, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 1383, - 1409 - ], - "loc": { - "start": { - "line": 64, - "column": 9 - }, - "end": { - "line": 64, - "column": 35 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - }, - "index": null, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1419, - 1423 - ], - "loc": { - "start": { - "line": 64, - "column": 45 - }, - "end": { - "line": 64, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1424, - 1426 - ], - "loc": { - "start": { - "line": 64, - "column": 50 - }, - "end": { - "line": 64, - "column": 52 - } - } - }, - "range": [ - 1419, - 1426 - ], - "loc": { - "start": { - "line": 64, - "column": 45 - }, - "end": { - "line": 64, - "column": 52 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "label", - "range": [ - 1433, - 1438 - ], - "loc": { - "start": { - "line": 65, - "column": 4 - }, - "end": { - "line": 65, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "receive", - "range": [ - 1446, - 1453 - ], - "loc": { - "start": { - "line": 66, - "column": 7 - }, - "end": { - "line": 66, - "column": 14 - } - } - }, - "modifiers": [], - "range": [ - 1443, - 1453 - ], - "loc": { - "start": { - "line": 66, - "column": 4 - }, - "end": { - "line": 66, - "column": 14 - } - } - }, - "intro": true, - "outro": false, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1457, - 1460 - ], - "loc": { - "start": { - "line": 66, - "column": 18 - }, - "end": { - "line": 66, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1462, - 1466 - ], - "loc": { - "start": { - "line": 66, - "column": 23 - }, - "end": { - "line": 66, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1467, - 1469 - ], - "loc": { - "start": { - "line": 66, - "column": 28 - }, - "end": { - "line": 66, - "column": 30 - } - } - }, - "range": [ - 1462, - 1469 - ], - "loc": { - "start": { - "line": 66, - "column": 23 - }, - "end": { - "line": 66, - "column": 30 - } - } - }, - "range": [ - 1457, - 1469 - ], - "loc": { - "start": { - "line": 66, - "column": 18 - }, - "end": { - "line": 66, - "column": 30 - } - } - } - ], - "range": [ - 1456, - 1470 - ], - "loc": { - "start": { - "line": 66, - "column": 17 - }, - "end": { - "line": 66, - "column": 31 - } - } - }, - "range": [ - 1443, - 1472 - ], - "loc": { - "start": { - "line": 66, - "column": 4 - }, - "end": { - "line": 66, - "column": 33 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "send", - "range": [ - 1481, - 1485 - ], - "loc": { - "start": { - "line": 67, - "column": 8 - }, - "end": { - "line": 67, - "column": 12 - } - } - }, - "modifiers": [], - "range": [ - 1477, - 1485 - ], - "loc": { - "start": { - "line": 67, - "column": 4 - }, - "end": { - "line": 67, - "column": 12 - } - } - }, - "intro": false, - "outro": true, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1489, - 1492 - ], - "loc": { - "start": { - "line": 67, - "column": 16 - }, - "end": { - "line": 67, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1494, - 1498 - ], - "loc": { - "start": { - "line": 67, - "column": 21 - }, - "end": { - "line": 67, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1499, - 1501 - ], - "loc": { - "start": { - "line": 67, - "column": 26 - }, - "end": { - "line": 67, - "column": 28 - } - } - }, - "range": [ - 1494, - 1501 - ], - "loc": { - "start": { - "line": 67, - "column": 21 - }, - "end": { - "line": 67, - "column": 28 - } - } - }, - "range": [ - 1489, - 1501 - ], - "loc": { - "start": { - "line": 67, - "column": 16 - }, - "end": { - "line": 67, - "column": 28 - } - } - } - ], - "range": [ - 1488, - 1502 - ], - "loc": { - "start": { - "line": 67, - "column": 15 - }, - "end": { - "line": 67, - "column": 29 - } - } - }, - "range": [ - 1477, - 1504 - ], - "loc": { - "start": { - "line": 67, - "column": 4 - }, - "end": { - "line": 67, - "column": 31 - } - } - } - ], - "selfClosing": false, - "range": [ - 1432, - 1509 - ], - "loc": { - "start": { - "line": 65, - "column": 3 - }, - "end": { - "line": 68, - "column": 4 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1509, - 1514 - ], - "loc": { - "start": { - "line": 68, - "column": 4 - }, - "end": { - "line": 69, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 1515, - 1520 - ], - "loc": { - "start": { - "line": 69, - "column": 5 - }, - "end": { - "line": 69, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "type", - "range": [ - 1521, - 1525 - ], - "loc": { - "start": { - "line": 69, - "column": 11 - }, - "end": { - "line": 69, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "checkbox", - "range": [ - 1526, - 1534 - ], - "loc": { - "start": { - "line": 69, - "column": 16 - }, - "end": { - "line": 69, - "column": 24 - } - } - } - ], - "range": [ - 1521, - 1534 - ], - "loc": { - "start": { - "line": 69, - "column": 11 - }, - "end": { - "line": 69, - "column": 24 - } - } - }, - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "change", - "range": [ - 1538, - 1544 - ], - "loc": { - "start": { - "line": 69, - "column": 28 - }, - "end": { - "line": 69, - "column": 34 - } - } - }, - "modifiers": [], - "range": [ - 1535, - 1544 - ], - "loc": { - "start": { - "line": 69, - "column": 25 - }, - "end": { - "line": 69, - "column": 34 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 47 - }, - "end": { - "line": 69, - "column": 51 - } - } - }, - { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 1563, - 1567 - ], - "loc": { - "start": { - "line": 69, - "column": 53 - }, - "end": { - "line": 69, - "column": 57 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "mark", - "range": [ - 1552, - 1556 - ], - "loc": { - "start": { - "line": 69, - "column": 42 - }, - "end": { - "line": 69, - "column": 46 - } - } - }, - "optional": false, - "range": [ - 1552, - 1568 - ], - "loc": { - "start": { - "line": 69, - "column": 42 - }, - "end": { - "line": 69, - "column": 58 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 1546, - 1568 - ], - "loc": { - "start": { - "line": 69, - "column": 36 - }, - "end": { - "line": 69, - "column": 58 - } - } - }, - "range": [ - 1535, - 1569 - ], - "loc": { - "start": { - "line": 69, - "column": 25 - }, - "end": { - "line": 69, - "column": 59 - } - } - } - ], - "selfClosing": false, - "range": [ - 1514, - 1570 - ], - "loc": { - "start": { - "line": 69, - "column": 4 - }, - "end": { - "line": 69, - "column": 60 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 1514, - 1570 - ], - "loc": { - "start": { - "line": 69, - "column": 4 - }, - "end": { - "line": 69, - "column": 60 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1570, - 1575 - ], - "loc": { - "start": { - "line": 69, - "column": 60 - }, - "end": { - "line": 70, - "column": 4 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1576, - 1580 - ], - "loc": { - "start": { - "line": 70, - "column": 5 - }, - "end": { - "line": 70, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "description", - "range": [ - 1581, - 1592 - ], - "loc": { - "start": { - "line": 70, - "column": 10 - }, - "end": { - "line": 70, - "column": 21 - } - } - }, - "range": [ - 1576, - 1592 - ], - "loc": { - "start": { - "line": 70, - "column": 5 - }, - "end": { - "line": 70, - "column": 21 - } - } - }, - "range": [ - 1575, - 1593 - ], - "loc": { - "start": { - "line": 70, - "column": 4 - }, - "end": { - "line": 70, - "column": 22 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1593, - 1598 - ], - "loc": { - "start": { - "line": 70, - "column": 22 - }, - "end": { - "line": 71, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "button", - "range": [ - 1599, - 1605 - ], - "loc": { - "start": { - "line": 71, - "column": 5 - }, - "end": { - "line": 71, - "column": 11 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "click", - "range": [ - 1609, - 1614 - ], - "loc": { - "start": { - "line": 71, - "column": 15 - }, - "end": { - "line": 71, - "column": 20 - } - } - }, - "modifiers": [], - "range": [ - 1606, - 1614 - ], - "loc": { - "start": { - "line": 71, - "column": 12 - }, - "end": { - "line": 71, - "column": 20 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1630, - 1634 - ], - "loc": { - "start": { - "line": 71, - "column": 36 - }, - "end": { - "line": 71, - "column": 40 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1623, - 1629 - ], - "loc": { - "start": { - "line": 71, - "column": 29 - }, - "end": { - "line": 71, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 1623, - 1635 - ], - "loc": { - "start": { - "line": 71, - "column": 29 - }, - "end": { - "line": 71, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 1617, - 1635 - ], - "loc": { - "start": { - "line": 71, - "column": 23 - }, - "end": { - "line": 71, - "column": 41 - } - } - }, - "range": [ - 1606, - 1637 - ], - "loc": { - "start": { - "line": 71, - "column": 12 - }, - "end": { - "line": 71, - "column": 43 - } - } - } - ], - "selfClosing": false, - "range": [ - 1598, - 1638 - ], - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 71, - "column": 44 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "remove", - "range": [ - 1638, - 1644 - ], - "loc": { - "start": { - "line": 71, - "column": 44 - }, - "end": { - "line": 71, - "column": 50 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1644, - 1653 - ], - "loc": { - "start": { - "line": 71, - "column": 50 - }, - "end": { - "line": 71, - "column": 59 - } - } - }, - "range": [ - 1598, - 1653 - ], - "loc": { - "start": { - "line": 71, - "column": 4 - }, - "end": { - "line": 71, - "column": 59 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 1653, - 1657 - ], - "loc": { - "start": { - "line": 71, - "column": 59 - }, - "end": { - "line": 72, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1657, - 1665 - ], - "loc": { - "start": { - "line": 72, - "column": 3 - }, - "end": { - "line": 72, - "column": 11 - } - } - }, - "range": [ - 1432, - 1665 - ], - "loc": { - "start": { - "line": 65, - "column": 3 - }, - "end": { - "line": 72, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 1376, - 1675 - ], - "loc": { - "start": { - "line": 64, - "column": 2 - }, - "end": { - "line": 73, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1419, - 1423 - ], - "loc": { - "start": { - "line": 64, - "column": 45 - }, - "end": { - "line": 64, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1462, - 1466 - ], - "loc": { - "start": { - "line": 66, - "column": 23 - }, - "end": { - "line": 66, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1494, - 1498 - ], - "loc": { - "start": { - "line": 67, - "column": 21 - }, - "end": { - "line": 67, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 47 - }, - "end": { - "line": 69, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1576, - 1580 - ], - "loc": { - "start": { - "line": 70, - "column": 5 - }, - "end": { - "line": 70, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1630, - 1634 - ], - "loc": { - "start": { - "line": 71, - "column": 36 - }, - "end": { - "line": 71, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1419, - 1423 - ], - "loc": { - "start": { - "line": 64, - "column": 45 - }, - "end": { - "line": 64, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1462, - 1466 - ], - "loc": { - "start": { - "line": 66, - "column": 23 - }, - "end": { - "line": 66, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1446, - 1453 - ], - "loc": { - "start": { - "line": 66, - "column": 7 - }, - "end": { - "line": 66, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1494, - 1498 - ], - "loc": { - "start": { - "line": 67, - "column": 21 - }, - "end": { - "line": 67, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1481, - 1485 - ], - "loc": { - "start": { - "line": 67, - "column": 8 - }, - "end": { - "line": 67, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1576, - 1580 - ], - "loc": { - "start": { - "line": 70, - "column": 5 - }, - "end": { - "line": 70, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1552, - 1556 - ], - "loc": { - "start": { - "line": 69, - "column": 42 - }, - "end": { - "line": 69, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 47 - }, - "end": { - "line": 69, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1552, - 1556 - ], - "loc": { - "start": { - "line": 69, - "column": 42 - }, - "end": { - "line": 69, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1557, - 1561 - ], - "loc": { - "start": { - "line": 69, - "column": 47 - }, - "end": { - "line": 69, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1623, - 1629 - ], - "loc": { - "start": { - "line": 71, - "column": 29 - }, - "end": { - "line": 71, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1630, - 1634 - ], - "loc": { - "start": { - "line": 71, - "column": 36 - }, - "end": { - "line": 71, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1623, - 1629 - ], - "loc": { - "start": { - "line": 71, - "column": 29 - }, - "end": { - "line": 71, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1630, - 1634 - ], - "loc": { - "start": { - "line": 71, - "column": 36 - }, - "end": { - "line": 71, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1413, - 1417 - ], - "loc": { - "start": { - "line": 64, - "column": 39 - }, - "end": { - "line": 64, - "column": 43 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1446, - 1453 - ], - "loc": { - "start": { - "line": 66, - "column": 7 - }, - "end": { - "line": 66, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1481, - 1485 - ], - "loc": { - "start": { - "line": 67, - "column": 8 - }, - "end": { - "line": 67, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1552, - 1556 - ], - "loc": { - "start": { - "line": 69, - "column": 42 - }, - "end": { - "line": 69, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1623, - 1629 - ], - "loc": { - "start": { - "line": 71, - "column": 29 - }, - "end": { - "line": 71, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1744, - 1745 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 1744, - 1745 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 23 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1749, - 1750 - ], - "loc": { - "start": { - "line": 78, - "column": 27 - }, - "end": { - "line": 78, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1751, - 1755 - ], - "loc": { - "start": { - "line": 78, - "column": 29 - }, - "end": { - "line": 78, - "column": 33 - } - } - }, - "range": [ - 1749, - 1755 - ], - "loc": { - "start": { - "line": 78, - "column": 27 - }, - "end": { - "line": 78, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1744, - 1745 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 23 - } - } - } - ], - "range": [ - 1744, - 1755 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 33 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1749, - 1750 - ], - "loc": { - "start": { - "line": 78, - "column": 27 - }, - "end": { - "line": 78, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1744, - 1745 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 1749, - 1750 - ], - "loc": { - "start": { - "line": 78, - "column": 27 - }, - "end": { - "line": 78, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 1744, - 1745 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 1749, - 1750 - ], - "loc": { - "start": { - "line": 78, - "column": 27 - }, - "end": { - "line": 78, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 1751, - 1755 - ], - "loc": { - "start": { - "line": 78, - "column": 29 - }, - "end": { - "line": 78, - "column": 33 - } - } - }, - "range": [ - 1749, - 1755 - ], - "loc": { - "start": { - "line": 78, - "column": 27 - }, - "end": { - "line": 78, - "column": 33 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 1744, - 1745 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 23 - } - } - } - ], - "range": [ - 1744, - 1755 - ], - "loc": { - "start": { - "line": 78, - "column": 22 - }, - "end": { - "line": 78, - "column": 33 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 1731, - 1736 - ], - "loc": { - "start": { - "line": 78, - "column": 9 - }, - "end": { - "line": 78, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 1737, - 1743 - ], - "loc": { - "start": { - "line": 78, - "column": 15 - }, - "end": { - "line": 78, - "column": 21 - } - } - }, - "range": [ - 1731, - 1743 - ], - "loc": { - "start": { - "line": 78, - "column": 9 - }, - "end": { - "line": 78, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 1731, - 1756 - ], - "loc": { - "start": { - "line": 78, - "column": 9 - }, - "end": { - "line": 78, - "column": 34 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - }, - "index": null, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1766, - 1770 - ], - "loc": { - "start": { - "line": 78, - "column": 44 - }, - "end": { - "line": 78, - "column": 48 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1771, - 1773 - ], - "loc": { - "start": { - "line": 78, - "column": 49 - }, - "end": { - "line": 78, - "column": 51 - } - } - }, - "range": [ - 1766, - 1773 - ], - "loc": { - "start": { - "line": 78, - "column": 44 - }, - "end": { - "line": 78, - "column": 51 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "label", - "range": [ - 1780, - 1785 - ], - "loc": { - "start": { - "line": 79, - "column": 4 - }, - "end": { - "line": 79, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 1786, - 1791 - ], - "loc": { - "start": { - "line": 79, - "column": 10 - }, - "end": { - "line": 79, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "done", - "range": [ - 1793, - 1797 - ], - "loc": { - "start": { - "line": 79, - "column": 17 - }, - "end": { - "line": 79, - "column": 21 - } - } - } - ], - "range": [ - 1786, - 1798 - ], - "loc": { - "start": { - "line": 79, - "column": 10 - }, - "end": { - "line": 79, - "column": 22 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "receive", - "range": [ - 1806, - 1813 - ], - "loc": { - "start": { - "line": 80, - "column": 7 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "modifiers": [], - "range": [ - 1803, - 1813 - ], - "loc": { - "start": { - "line": 80, - "column": 4 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "intro": true, - "outro": false, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1817, - 1820 - ], - "loc": { - "start": { - "line": 80, - "column": 18 - }, - "end": { - "line": 80, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1822, - 1826 - ], - "loc": { - "start": { - "line": 80, - "column": 23 - }, - "end": { - "line": 80, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1827, - 1829 - ], - "loc": { - "start": { - "line": 80, - "column": 28 - }, - "end": { - "line": 80, - "column": 30 - } - } - }, - "range": [ - 1822, - 1829 - ], - "loc": { - "start": { - "line": 80, - "column": 23 - }, - "end": { - "line": 80, - "column": 30 - } - } - }, - "range": [ - 1817, - 1829 - ], - "loc": { - "start": { - "line": 80, - "column": 18 - }, - "end": { - "line": 80, - "column": 30 - } - } - } - ], - "range": [ - 1816, - 1830 - ], - "loc": { - "start": { - "line": 80, - "column": 17 - }, - "end": { - "line": 80, - "column": 31 - } - } - }, - "range": [ - 1803, - 1832 - ], - "loc": { - "start": { - "line": 80, - "column": 4 - }, - "end": { - "line": 80, - "column": 33 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "send", - "range": [ - 1841, - 1845 - ], - "loc": { - "start": { - "line": 81, - "column": 8 - }, - "end": { - "line": 81, - "column": 12 - } - } - }, - "modifiers": [], - "range": [ - 1837, - 1845 - ], - "loc": { - "start": { - "line": 81, - "column": 4 - }, - "end": { - "line": 81, - "column": 12 - } - } - }, - "intro": false, - "outro": true, - "expression": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "key", - "range": [ - 1849, - 1852 - ], - "loc": { - "start": { - "line": 81, - "column": 16 - }, - "end": { - "line": 81, - "column": 19 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1854, - 1858 - ], - "loc": { - "start": { - "line": 81, - "column": 21 - }, - "end": { - "line": 81, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 1859, - 1861 - ], - "loc": { - "start": { - "line": 81, - "column": 26 - }, - "end": { - "line": 81, - "column": 28 - } - } - }, - "range": [ - 1854, - 1861 - ], - "loc": { - "start": { - "line": 81, - "column": 21 - }, - "end": { - "line": 81, - "column": 28 - } - } - }, - "range": [ - 1849, - 1861 - ], - "loc": { - "start": { - "line": 81, - "column": 16 - }, - "end": { - "line": 81, - "column": 28 - } - } - } - ], - "range": [ - 1848, - 1862 - ], - "loc": { - "start": { - "line": 81, - "column": 15 - }, - "end": { - "line": 81, - "column": 29 - } - } - }, - "range": [ - 1837, - 1864 - ], - "loc": { - "start": { - "line": 81, - "column": 4 - }, - "end": { - "line": 81, - "column": 31 - } - } - } - ], - "selfClosing": false, - "range": [ - 1779, - 1865 - ], - "loc": { - "start": { - "line": 79, - "column": 3 - }, - "end": { - "line": 81, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1865, - 1870 - ], - "loc": { - "start": { - "line": 81, - "column": 32 - }, - "end": { - "line": 82, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 1871, - 1876 - ], - "loc": { - "start": { - "line": 82, - "column": 5 - }, - "end": { - "line": 82, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "type", - "range": [ - 1877, - 1881 - ], - "loc": { - "start": { - "line": 82, - "column": 11 - }, - "end": { - "line": 82, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "checkbox", - "range": [ - 1882, - 1890 - ], - "loc": { - "start": { - "line": 82, - "column": 16 - }, - "end": { - "line": 82, - "column": 24 - } - } - } - ], - "range": [ - 1877, - 1890 - ], - "loc": { - "start": { - "line": 82, - "column": 11 - }, - "end": { - "line": 82, - "column": 24 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "checked", - "range": [ - 1891, - 1898 - ], - "loc": { - "start": { - "line": 82, - "column": 25 - }, - "end": { - "line": 82, - "column": 32 - } - } - }, - "boolean": true, - "value": [], - "range": [ - 1891, - 1898 - ], - "loc": { - "start": { - "line": 82, - "column": 25 - }, - "end": { - "line": 82, - "column": 32 - } - } - }, - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "change", - "range": [ - 1902, - 1908 - ], - "loc": { - "start": { - "line": 82, - "column": 36 - }, - "end": { - "line": 82, - "column": 42 - } - } - }, - "modifiers": [], - "range": [ - 1899, - 1908 - ], - "loc": { - "start": { - "line": 82, - "column": 33 - }, - "end": { - "line": 82, - "column": 42 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1921, - 1925 - ], - "loc": { - "start": { - "line": 82, - "column": 55 - }, - "end": { - "line": 82, - "column": 59 - } - } - }, - { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 1927, - 1932 - ], - "loc": { - "start": { - "line": 82, - "column": 61 - }, - "end": { - "line": 82, - "column": 66 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "mark", - "range": [ - 1916, - 1920 - ], - "loc": { - "start": { - "line": 82, - "column": 50 - }, - "end": { - "line": 82, - "column": 54 - } - } - }, - "optional": false, - "range": [ - 1916, - 1933 - ], - "loc": { - "start": { - "line": 82, - "column": 50 - }, - "end": { - "line": 82, - "column": 67 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 1910, - 1933 - ], - "loc": { - "start": { - "line": 82, - "column": 44 - }, - "end": { - "line": 82, - "column": 67 - } - } - }, - "range": [ - 1899, - 1934 - ], - "loc": { - "start": { - "line": 82, - "column": 33 - }, - "end": { - "line": 82, - "column": 68 - } - } - } - ], - "selfClosing": false, - "range": [ - 1870, - 1935 - ], - "loc": { - "start": { - "line": 82, - "column": 4 - }, - "end": { - "line": 82, - "column": 69 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 1870, - 1935 - ], - "loc": { - "start": { - "line": 82, - "column": 4 - }, - "end": { - "line": 82, - "column": 69 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1935, - 1940 - ], - "loc": { - "start": { - "line": 82, - "column": 69 - }, - "end": { - "line": 83, - "column": 4 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 1941, - 1945 - ], - "loc": { - "start": { - "line": 83, - "column": 5 - }, - "end": { - "line": 83, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "description", - "range": [ - 1946, - 1957 - ], - "loc": { - "start": { - "line": 83, - "column": 10 - }, - "end": { - "line": 83, - "column": 21 - } - } - }, - "range": [ - 1941, - 1957 - ], - "loc": { - "start": { - "line": 83, - "column": 5 - }, - "end": { - "line": 83, - "column": 21 - } - } - }, - "range": [ - 1940, - 1958 - ], - "loc": { - "start": { - "line": 83, - "column": 4 - }, - "end": { - "line": 83, - "column": 22 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1958, - 1963 - ], - "loc": { - "start": { - "line": 83, - "column": 22 - }, - "end": { - "line": 84, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "button", - "range": [ - 1964, - 1970 - ], - "loc": { - "start": { - "line": 84, - "column": 5 - }, - "end": { - "line": 84, - "column": 11 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "click", - "range": [ - 1974, - 1979 - ], - "loc": { - "start": { - "line": 84, - "column": 15 - }, - "end": { - "line": 84, - "column": 20 - } - } - }, - "modifiers": [], - "range": [ - 1971, - 1979 - ], - "loc": { - "start": { - "line": 84, - "column": 12 - }, - "end": { - "line": 84, - "column": 20 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 1995, - 1999 - ], - "loc": { - "start": { - "line": 84, - "column": 36 - }, - "end": { - "line": 84, - "column": 40 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "remove", - "range": [ - 1988, - 1994 - ], - "loc": { - "start": { - "line": 84, - "column": 29 - }, - "end": { - "line": 84, - "column": 35 - } - } - }, - "optional": false, - "range": [ - 1988, - 2000 - ], - "loc": { - "start": { - "line": 84, - "column": 29 - }, - "end": { - "line": 84, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 1982, - 2000 - ], - "loc": { - "start": { - "line": 84, - "column": 23 - }, - "end": { - "line": 84, - "column": 41 - } - } - }, - "range": [ - 1971, - 2002 - ], - "loc": { - "start": { - "line": 84, - "column": 12 - }, - "end": { - "line": 84, - "column": 43 - } - } - } - ], - "selfClosing": false, - "range": [ - 1963, - 2003 - ], - "loc": { - "start": { - "line": 84, - "column": 4 - }, - "end": { - "line": 84, - "column": 44 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "remove", - "range": [ - 2003, - 2009 - ], - "loc": { - "start": { - "line": 84, - "column": 44 - }, - "end": { - "line": 84, - "column": 50 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 2009, - 2018 - ], - "loc": { - "start": { - "line": 84, - "column": 50 - }, - "end": { - "line": 84, - "column": 59 - } - } - }, - "range": [ - 1963, - 2018 - ], - "loc": { - "start": { - "line": 84, - "column": 4 - }, - "end": { - "line": 84, - "column": 59 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 2018, - 2022 - ], - "loc": { - "start": { - "line": 84, - "column": 59 - }, - "end": { - "line": 85, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 2022, - 2030 - ], - "loc": { - "start": { - "line": 85, - "column": 3 - }, - "end": { - "line": 85, - "column": 11 - } - } - }, - "range": [ - 1779, - 2030 - ], - "loc": { - "start": { - "line": 79, - "column": 3 - }, - "end": { - "line": 85, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 1724, - 2040 - ], - "loc": { - "start": { - "line": 78, - "column": 2 - }, - "end": { - "line": 86, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1766, - 1770 - ], - "loc": { - "start": { - "line": 78, - "column": 44 - }, - "end": { - "line": 78, - "column": 48 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1822, - 1826 - ], - "loc": { - "start": { - "line": 80, - "column": 23 - }, - "end": { - "line": 80, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1854, - 1858 - ], - "loc": { - "start": { - "line": 81, - "column": 21 - }, - "end": { - "line": 81, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1921, - 1925 - ], - "loc": { - "start": { - "line": 82, - "column": 55 - }, - "end": { - "line": 82, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1941, - 1945 - ], - "loc": { - "start": { - "line": 83, - "column": 5 - }, - "end": { - "line": 83, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1995, - 1999 - ], - "loc": { - "start": { - "line": 84, - "column": 36 - }, - "end": { - "line": 84, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1766, - 1770 - ], - "loc": { - "start": { - "line": 78, - "column": 44 - }, - "end": { - "line": 78, - "column": 48 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1822, - 1826 - ], - "loc": { - "start": { - "line": 80, - "column": 23 - }, - "end": { - "line": 80, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1806, - 1813 - ], - "loc": { - "start": { - "line": 80, - "column": 7 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1854, - 1858 - ], - "loc": { - "start": { - "line": 81, - "column": 21 - }, - "end": { - "line": 81, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1841, - 1845 - ], - "loc": { - "start": { - "line": 81, - "column": 8 - }, - "end": { - "line": 81, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1941, - 1945 - ], - "loc": { - "start": { - "line": 83, - "column": 5 - }, - "end": { - "line": 83, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1916, - 1920 - ], - "loc": { - "start": { - "line": 82, - "column": 50 - }, - "end": { - "line": 82, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1921, - 1925 - ], - "loc": { - "start": { - "line": 82, - "column": 55 - }, - "end": { - "line": 82, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1916, - 1920 - ], - "loc": { - "start": { - "line": 82, - "column": 50 - }, - "end": { - "line": 82, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1921, - 1925 - ], - "loc": { - "start": { - "line": 82, - "column": 55 - }, - "end": { - "line": 82, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1988, - 1994 - ], - "loc": { - "start": { - "line": 84, - "column": 29 - }, - "end": { - "line": 84, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1995, - 1999 - ], - "loc": { - "start": { - "line": 84, - "column": 36 - }, - "end": { - "line": 84, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1988, - 1994 - ], - "loc": { - "start": { - "line": 84, - "column": 29 - }, - "end": { - "line": 84, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 1995, - 1999 - ], - "loc": { - "start": { - "line": 84, - "column": 36 - }, - "end": { - "line": 84, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 1760, - 1764 - ], - "loc": { - "start": { - "line": 78, - "column": 38 - }, - "end": { - "line": 78, - "column": 42 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "receive", - "range": [ - 1806, - 1813 - ], - "loc": { - "start": { - "line": 80, - "column": 7 - }, - "end": { - "line": 80, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "receive", - "range": [ - 115, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "send", - "range": [ - 1841, - 1845 - ], - "loc": { - "start": { - "line": 81, - "column": 8 - }, - "end": { - "line": 81, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "send", - "range": [ - 109, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "mark", - "range": [ - 1916, - 1920 - ], - "loc": { - "start": { - "line": 82, - "column": 50 - }, - "end": { - "line": 82, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "mark", - "range": [ - 1113, - 1117 - ], - "loc": { - "start": { - "line": 49, - "column": 10 - }, - "end": { - "line": 49, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remove", - "range": [ - 1988, - 1994 - ], - "loc": { - "start": { - "line": 84, - "column": 29 - }, - "end": { - "line": 84, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remove", - "range": [ - 1043, - 1049 - ], - "loc": { - "start": { - "line": 45, - "column": 10 - }, - "end": { - "line": 45, - "column": 16 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 155, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "getComputedStyle", - "range": [ - 220, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 17 - }, - "end": { - "line": 9, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json index e3a07296..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1158 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "time", - "identifiers": [ - { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$time", - "range": [ - 233, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "elapsed", - "identifiers": [ - { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "local": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$elapsed", - "range": [ - 282, - 290 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$elapsed", - "range": [ - 293, - 301 - ], - "loc": { - "start": { - "line": 16, - "column": 13 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$elapsed", - "range": [ - 293, - 301 - ], - "loc": { - "start": { - "line": 16, - "column": 13 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ] - }, - { - "name": "formatter", - "identifiers": [ - { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'en'", - "value": "en", - "range": [ - 99, - 103 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "hour12", - "range": [ - 109, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 109, - 121 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "hour", - "range": [ - 125, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'numeric'", - "value": "numeric", - "range": [ - 131, - 140 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 125, - 140 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "minute", - "range": [ - 144, - 150 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'2-digit'", - "value": "2-digit", - "range": [ - 152, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 144, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "second", - "range": [ - 165, - 171 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'2-digit'", - "value": "2-digit", - "range": [ - 173, - 182 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "range": [ - 165, - 182 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "range": [ - 105, - 185 - ], - "loc": { - "start": { - "line": 4, - "column": 49 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Intl", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "DateTimeFormat", - "range": [ - 84, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 28 - }, - "end": { - "line": 4, - "column": 42 - } - } - }, - "range": [ - 79, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 42 - } - } - }, - "range": [ - 75, - 186 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "range": [ - 63, - 186 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 216, - 225 - ], - "loc": { - "start": { - "line": 12, - "column": 17 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Intl", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 216, - 225 - ], - "loc": { - "start": { - "line": 12, - "column": 17 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 63, - 72 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$time", - "range": [ - 233, - 238 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$elapsed", - "range": [ - 282, - 290 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$elapsed", - "range": [ - 293, - 301 - ], - "loc": { - "start": { - "line": 16, - "column": 13 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elapsed", - "range": [ - 25, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Intl", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Intl", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json index e54bcc78..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1190 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "w", - "identifiers": [ - { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": null, - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "w", - "range": [ - 259, - 260 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "w", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "h", - "identifiers": [ - { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": null, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "h", - "range": [ - 267, - 268 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "h", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 19, - "column": 45 - }, - "end": { - "line": 19, - "column": 46 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - }, - { - "name": "size", - "identifiers": [ - { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "42", - "value": 42, - "range": [ - 37, - 39 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "range": [ - 30, - 39 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 215, - 219 - ], - "loc": { - "start": { - "line": 14, - "column": 30 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - }, - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'edit me'", - "value": "edit me", - "range": [ - 53, - 62 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 46, - 62 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 241, - 245 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 362, - 366 - ], - "loc": { - "start": { - "line": 20, - "column": 36 - }, - "end": { - "line": 20, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 215, - 219 - ], - "loc": { - "start": { - "line": 14, - "column": 30 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 241, - 245 - ], - "loc": { - "start": { - "line": 15, - "column": 19 - }, - "end": { - "line": 15, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "w", - "range": [ - 259, - 260 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "h", - "range": [ - 267, - 268 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "w", - "range": [ - 300, - 301 - ], - "loc": { - "start": { - "line": 19, - "column": 23 - }, - "end": { - "line": 19, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "w", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "h", - "range": [ - 322, - 323 - ], - "loc": { - "start": { - "line": 19, - "column": 45 - }, - "end": { - "line": 19, - "column": 46 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "h", - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 30, - 34 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 362, - 366 - ], - "loc": { - "start": { - "line": 20, - "column": 36 - }, - "end": { - "line": 20, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json index 6fd75e21..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,552 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "CustomButton", - "identifiers": [ - { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 17, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 17, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 17, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "range": [ - 17, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 122, - 134 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 17, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 71, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 71, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'clicked'", - "value": "clicked", - "range": [ - 95, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 17 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 89, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 89, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "range": [ - 85, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 71, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [], - "range": [ - 62, - 109 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 145, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 71, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 145, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 24 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 71, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 122, - 134 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "CustomButton", - "range": [ - 17, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json index b9a04aeb..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1803 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "m", - "identifiers": [ - { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 20, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - ], - "range": [ - 18, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 14, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 245, - 246 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 15, - "column": 32 - }, - "end": { - "line": 15, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "handleMousemove", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 74, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 84, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 92 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 97, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientY", - "range": [ - 107, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 101, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "range": [ - 68, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 33 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 36, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 203, - 218 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 203, - 218 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 245, - 246 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 15, - "column": 32 - }, - "end": { - "line": 15, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 74, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 84, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 92 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 97, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientY", - "range": [ - 107, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 101, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "range": [ - 68, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 33 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 36, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json index 69aaebdd..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,440 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "src", - "identifiers": [ - { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "'tutorial/image.gif'", - "value": "tutorial/image.gif", - "range": [ - 20, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 14, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 85, - 88 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 117, - 120 - ], - "loc": { - "start": { - "line": 8, - "column": 6 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json index cb96922e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4134 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "todos", - "identifiers": [ - { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 28, - 32 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 34, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "range": [ - 28, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 41, - 45 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'finish Svelte tutorial'", - "value": "finish Svelte tutorial", - "range": [ - 47, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 47 - } - } - }, - "range": [ - 41, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 47 - } - } - } - ], - "range": [ - 26, - 73 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 49 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 85, - 90 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "range": [ - 79, - 90 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 92, - 96 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'build an app'", - "value": "build an app", - "range": [ - 98, - 112 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - "range": [ - 92, - 112 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 37 - } - } - } - ], - "range": [ - 77, - 114 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 120, - 124 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 126, - 131 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "range": [ - 120, - 131 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 133, - 137 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'world domination'", - "value": "world domination", - "range": [ - 139, - 157 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "range": [ - 133, - 157 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 41 - } - } - } - ], - "range": [ - 118, - 159 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 43 - } - } - } - ], - "range": [ - 22, - 162 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "range": [ - 14, - 162 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 185, - 190 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 260, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 268, - 273 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 431, - 436 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "add", - "identifiers": [ - { - "type": "Identifier", - "name": "add", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "add", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 185, - 190 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 208, - 212 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 214, - 219 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "range": [ - 208, - 219 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 221, - 225 - ], - "loc": { - "start": { - "line": 9, - "column": 38 - }, - "end": { - "line": 9, - "column": 42 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 227, - 229 - ], - "loc": { - "start": { - "line": 9, - "column": 44 - }, - "end": { - "line": 9, - "column": 46 - } - } - }, - "range": [ - 221, - 229 - ], - "loc": { - "start": { - "line": 9, - "column": 38 - }, - "end": { - "line": 9, - "column": 46 - } - } - } - ], - "range": [ - 206, - 231 - ], - "loc": { - "start": { - "line": 9, - "column": 23 - }, - "end": { - "line": 9, - "column": 48 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 199, - 205 - ], - "loc": { - "start": { - "line": 9, - "column": 16 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "range": [ - 193, - 205 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 193, - 232 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 49 - } - } - }, - "range": [ - 185, - 232 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 49 - } - } - }, - "range": [ - 185, - 233 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 50 - } - } - } - ], - "range": [ - 181, - 236 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "add", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "params": [], - "range": [ - 166, - 236 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 679, - 682 - ], - "loc": { - "start": { - "line": 43, - "column": 18 - }, - "end": { - "line": 43, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ] - }, - { - "name": "clear", - "identifiers": [ - { - "type": "Identifier", - "name": "clear", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "clear", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 260, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 287, - 288 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 289, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "range": [ - 287, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 286, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "range": [ - 281, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 35 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 268, - 273 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 274, - 280 - ], - "loc": { - "start": { - "line": 13, - "column": 16 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "range": [ - 268, - 280 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 268, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 36 - } - } - }, - "range": [ - 260, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 36 - } - } - }, - "range": [ - 260, - 295 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 37 - } - } - } - ], - "range": [ - 256, - 298 - ], - "loc": { - "start": { - "line": 12, - "column": 18 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "clear", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - }, - "params": [], - "range": [ - 239, - 298 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "clear", - "range": [ - 723, - 728 - ], - "loc": { - "start": { - "line": 47, - "column": 18 - }, - "end": { - "line": 47, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "clear", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - } - } - ] - }, - { - "name": "remaining", - "identifiers": [ - { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 335, - 336 - ], - "loc": { - "start": { - "line": 16, - "column": 35 - }, - "end": { - "line": 16, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 337, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - "range": [ - 335, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 35 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 334, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 329, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 30 - } - } - } - ], - "range": [ - 329, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 41 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 322, - 328 - ], - "loc": { - "start": { - "line": 16, - "column": 22 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - "range": [ - 316, - 328 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 316, - 342 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 42 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 343, - 349 - ], - "loc": { - "start": { - "line": 16, - "column": 43 - }, - "end": { - "line": 16, - "column": 49 - } - } - }, - "range": [ - 316, - 349 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 49 - } - } - }, - "range": [ - 304, - 349 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 49 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "remaining", - "range": [ - 635, - 644 - ], - "loc": { - "start": { - "line": 41, - "column": 4 - }, - "end": { - "line": 41, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 316, - 321 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 431, - 436 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "remaining", - "range": [ - 635, - 644 - ], - "loc": { - "start": { - "line": 41, - "column": 4 - }, - "end": { - "line": 41, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "remaining", - "range": [ - 304, - 313 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "add", - "range": [ - 679, - 682 - ], - "loc": { - "start": { - "line": 43, - "column": 18 - }, - "end": { - "line": 43, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "add", - "range": [ - 175, - 178 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "clear", - "range": [ - 723, - 728 - ], - "loc": { - "start": { - "line": 47, - "column": 18 - }, - "end": { - "line": 47, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "clear", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 185, - 190 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 185, - 190 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 193, - 198 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 260, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 268, - 273 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 287, - 288 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 289, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "range": [ - 287, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 286, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 28 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - ], - "range": [ - 281, - 293 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 287, - 288 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 287, - 288 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 281, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 24 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 260, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 268, - 273 - ], - "loc": { - "start": { - "line": 13, - "column": 10 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 329, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 329, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 30 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "t", - "range": [ - 335, - 336 - ], - "loc": { - "start": { - "line": 16, - "column": 35 - }, - "end": { - "line": 16, - "column": 36 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 337, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 37 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - "range": [ - 335, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 35 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 334, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 34 - }, - "end": { - "line": 16, - "column": 41 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 329, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 30 - } - } - } - ], - "range": [ - 329, - 341 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 335, - 336 - ], - "loc": { - "start": { - "line": 16, - "column": 35 - }, - "end": { - "line": 16, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 329, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 30 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 335, - 336 - ], - "loc": { - "start": { - "line": 16, - "column": 35 - }, - "end": { - "line": 16, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 329, - 330 - ], - "loc": { - "start": { - "line": 16, - "column": 29 - }, - "end": { - "line": 16, - "column": 30 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "todos", - "range": [ - 431, - 436 - ], - "loc": { - "start": { - "line": 27, - "column": 7 - }, - "end": { - "line": 27, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 448, - 451 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Class", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "done", - "range": [ - 458, - 462 - ], - "loc": { - "start": { - "line": 28, - "column": 12 - }, - "end": { - "line": 28, - "column": 16 - } - } - }, - "modifiers": [], - "range": [ - 452, - 462 - ], - "loc": { - "start": { - "line": 28, - "column": 6 - }, - "end": { - "line": 28, - "column": 16 - } - } - }, - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 464, - 468 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 469, - 473 - ], - "loc": { - "start": { - "line": 28, - "column": 23 - }, - "end": { - "line": 28, - "column": 27 - } - } - }, - "range": [ - 464, - 473 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 27 - } - } - }, - "shorthand": false, - "range": [ - 452, - 474 - ], - "loc": { - "start": { - "line": 28, - "column": 6 - }, - "end": { - "line": 28, - "column": 28 - } - } - } - ], - "selfClosing": false, - "range": [ - 447, - 475 - ], - "loc": { - "start": { - "line": 28, - "column": 1 - }, - "end": { - "line": 28, - "column": 29 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 475, - 478 - ], - "loc": { - "start": { - "line": 28, - "column": 29 - }, - "end": { - "line": 29, - "column": 2 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 479, - 484 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "type", - "range": [ - 488, - 492 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 7 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "checkbox", - "range": [ - 493, - 501 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 16 - } - } - } - ], - "range": [ - 488, - 501 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Binding", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "checked", - "range": [ - 510, - 517 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 15 - } - } - }, - "modifiers": [], - "range": [ - 505, - 517 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 15 - } - } - }, - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 519, - 523 - ], - "loc": { - "start": { - "line": 31, - "column": 17 - }, - "end": { - "line": 31, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 524, - 528 - ], - "loc": { - "start": { - "line": 31, - "column": 22 - }, - "end": { - "line": 31, - "column": 26 - } - } - }, - "range": [ - 519, - 528 - ], - "loc": { - "start": { - "line": 31, - "column": 17 - }, - "end": { - "line": 31, - "column": 26 - } - } - }, - "shorthand": false, - "range": [ - 505, - 529 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 27 - } - } - } - ], - "selfClosing": false, - "range": [ - 478, - 533 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 478, - 533 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - { - "type": "SvelteText", - "value": "\n\n\t\t", - "range": [ - 533, - 537 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 34, - "column": 2 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 538, - 543 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "placeholder", - "range": [ - 547, - 558 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 14 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "What needs to be done?", - "range": [ - 560, - 582 - ], - "loc": { - "start": { - "line": 35, - "column": 16 - }, - "end": { - "line": 35, - "column": 38 - } - } - } - ], - "range": [ - 547, - 583 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 39 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Binding", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "value", - "range": [ - 592, - 597 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "modifiers": [], - "range": [ - 587, - 597 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 599, - 603 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 36, - "column": 19 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 604, - 608 - ], - "loc": { - "start": { - "line": 36, - "column": 20 - }, - "end": { - "line": 36, - "column": 24 - } - } - }, - "range": [ - 599, - 608 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 36, - "column": 24 - } - } - }, - "shorthand": false, - "range": [ - 587, - 609 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 25 - } - } - } - ], - "selfClosing": false, - "range": [ - 537, - 613 - ], - "loc": { - "start": { - "line": 34, - "column": 2 - }, - "end": { - "line": 37, - "column": 3 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 537, - 613 - ], - "loc": { - "start": { - "line": 34, - "column": 2 - }, - "end": { - "line": 37, - "column": 3 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 613, - 615 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 38, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 615, - 621 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 7 - } - } - }, - "range": [ - 447, - 621 - ], - "loc": { - "start": { - "line": 28, - "column": 1 - }, - "end": { - "line": 38, - "column": 7 - } - } - } - ], - "else": null, - "range": [ - 424, - 629 - ], - "loc": { - "start": { - "line": 27, - "column": 0 - }, - "end": { - "line": 39, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 464, - 468 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 519, - 523 - ], - "loc": { - "start": { - "line": 31, - "column": 17 - }, - "end": { - "line": 31, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 599, - 603 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 36, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 464, - 468 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 519, - 523 - ], - "loc": { - "start": { - "line": 31, - "column": 17 - }, - "end": { - "line": 31, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 599, - 603 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 36, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 440, - 444 - ], - "loc": { - "start": { - "line": 27, - "column": 16 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json index c9c643a2..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1404 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "cats", - "identifiers": [ - { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 27, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'J---aiyznGQ'", - "value": "J---aiyznGQ", - "range": [ - 31, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 27, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Keyboard Cat'", - "value": "Keyboard Cat", - "range": [ - 52, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 46, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - ], - "range": [ - 25, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 74, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'z_AbfPXTKms'", - "value": "z_AbfPXTKms", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "range": [ - 74, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 93, - 97 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Maru'", - "value": "Maru", - "range": [ - 99, - 105 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 35 - } - } - }, - "range": [ - 93, - 105 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 35 - } - } - } - ], - "range": [ - 72, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 113, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'OUtn3pvWmpg'", - "value": "OUtn3pvWmpg", - "range": [ - 117, - 130 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 113, - 130 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Henri The Existential Cat'", - "value": "Henri The Existential Cat", - "range": [ - 138, - 165 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 56 - } - } - }, - "range": [ - 132, - 165 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 56 - } - } - } - ], - "range": [ - 111, - 167 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 58 - } - } - } - ], - "range": [ - 21, - 170 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "range": [ - 14, - 170 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "cat", - "identifiers": [ - { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 249, - 251 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 248, - 252 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "a", - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 7 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "target", - "range": [ - 255, - 261 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "_blank", - "range": [ - 263, - 269 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "range": [ - 255, - 270 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "href", - "range": [ - 271, - 275 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "https://www.youtube.com/watch?v=", - "range": [ - 277, - 309 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "cat", - "range": [ - 310, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 314, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 68 - }, - "end": { - "line": 13, - "column": 70 - } - } - }, - "range": [ - 310, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 70 - } - } - }, - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 13, - "column": 63 - }, - "end": { - "line": 13, - "column": 71 - } - } - } - ], - "range": [ - 271, - 318 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 72 - } - } - } - ], - "selfClosing": false, - "range": [ - 252, - 319 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 73 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 319, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 73 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "cat", - "range": [ - 324, - 327 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 328, - 332 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "range": [ - 324, - 332 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "range": [ - 323, - 333 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 13 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 333, - 336 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 15, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 336, - 340 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "range": [ - 252, - 340 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 15, - "column": 6 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 340, - 345 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 11 - } - } - }, - "range": [ - 248, - 345 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 15, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 226, - 354 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 16, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 310, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 324, - 327 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 310, - 313 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 324, - 327 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json index 39bc0800..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2249 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "cats", - "identifiers": [ - { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 27, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'J---aiyznGQ'", - "value": "J---aiyznGQ", - "range": [ - 31, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 27, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Keyboard Cat'", - "value": "Keyboard Cat", - "range": [ - 52, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "range": [ - 46, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 23 - }, - "end": { - "line": 3, - "column": 43 - } - } - } - ], - "range": [ - 25, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 45 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 74, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'z_AbfPXTKms'", - "value": "z_AbfPXTKms", - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "range": [ - 74, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 93, - 97 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Maru'", - "value": "Maru", - "range": [ - 99, - 105 - ], - "loc": { - "start": { - "line": 4, - "column": 29 - }, - "end": { - "line": 4, - "column": 35 - } - } - }, - "range": [ - 93, - 105 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 35 - } - } - } - ], - "range": [ - 72, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 113, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'OUtn3pvWmpg'", - "value": "OUtn3pvWmpg", - "range": [ - 117, - 130 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 113, - 130 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 132, - 136 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Henri The Existential Cat'", - "value": "Henri The Existential Cat", - "range": [ - 138, - 165 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 56 - } - } - }, - "range": [ - 132, - 165 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 56 - } - } - } - ], - "range": [ - 111, - 167 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 58 - } - } - } - ], - "range": [ - 21, - 170 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "range": [ - 14, - 170 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cats", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "cat", - "identifiers": [ - { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 246, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 252, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "a", - "range": [ - 256, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 7 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "target", - "range": [ - 258, - 264 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "_blank", - "range": [ - 266, - 272 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "range": [ - 258, - 273 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "href", - "range": [ - 274, - 278 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "https://www.youtube.com/watch?v=", - "range": [ - 280, - 312 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "cat", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 317, - 319 - ], - "loc": { - "start": { - "line": 13, - "column": 68 - }, - "end": { - "line": 13, - "column": 70 - } - } - }, - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 70 - } - } - }, - "range": [ - 312, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 63 - }, - "end": { - "line": 13, - "column": 71 - } - } - } - ], - "range": [ - 274, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 72 - } - } - } - ], - "selfClosing": false, - "range": [ - 255, - 322 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 73 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 322, - 326 - ], - "loc": { - "start": { - "line": 13, - "column": 73 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "range": [ - 327, - 332 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "range": [ - 326, - 333 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 333, - 335 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "cat", - "range": [ - 336, - 339 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 340, - 344 - ], - "loc": { - "start": { - "line": 14, - "column": 17 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "range": [ - 336, - 344 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "range": [ - 335, - 345 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 22 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 345, - 348 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 15, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 348, - 352 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "range": [ - 255, - 352 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 15, - "column": 6 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 352, - 357 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 11 - } - } - }, - "range": [ - 251, - 357 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 15, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 226, - 366 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 16, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 336, - 339 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 246, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 246, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "cats", - "range": [ - 233, - 237 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "index": { - "type": "Identifier", - "name": "i", - "range": [ - 246, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 252, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 251, - 255 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "a", - "range": [ - 256, - 257 - ], - "loc": { - "start": { - "line": 13, - "column": 7 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "target", - "range": [ - 258, - 264 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "_blank", - "range": [ - 266, - 272 - ], - "loc": { - "start": { - "line": 13, - "column": 17 - }, - "end": { - "line": 13, - "column": 23 - } - } - } - ], - "range": [ - 258, - 273 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 24 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "href", - "range": [ - 274, - 278 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "https://www.youtube.com/watch?v=", - "range": [ - 280, - 312 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 63 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "cat", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 317, - 319 - ], - "loc": { - "start": { - "line": 13, - "column": 68 - }, - "end": { - "line": 13, - "column": 70 - } - } - }, - "range": [ - 313, - 319 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 70 - } - } - }, - "range": [ - 312, - 320 - ], - "loc": { - "start": { - "line": 13, - "column": 63 - }, - "end": { - "line": 13, - "column": 71 - } - } - } - ], - "range": [ - 274, - 321 - ], - "loc": { - "start": { - "line": 13, - "column": 25 - }, - "end": { - "line": 13, - "column": 72 - } - } - } - ], - "selfClosing": false, - "range": [ - 255, - 322 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 73 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 322, - 326 - ], - "loc": { - "start": { - "line": 13, - "column": 73 - }, - "end": { - "line": 14, - "column": 3 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "i", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 331, - 332 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "range": [ - 327, - 332 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 9 - } - } - }, - "range": [ - 326, - 333 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 10 - } - } - }, - { - "type": "SvelteText", - "value": ": ", - "range": [ - 333, - 335 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "cat", - "range": [ - 336, - 339 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "name", - "range": [ - 340, - 344 - ], - "loc": { - "start": { - "line": 14, - "column": 17 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "range": [ - 336, - 344 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "range": [ - 335, - 345 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 22 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 345, - 348 - ], - "loc": { - "start": { - "line": 14, - "column": 22 - }, - "end": { - "line": 15, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 348, - 352 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 6 - } - } - }, - "range": [ - 255, - 352 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 15, - "column": 6 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 352, - 357 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 11 - } - } - }, - "range": [ - 251, - 357 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 15, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 226, - 366 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 16, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 246, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 313, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 64 - }, - "end": { - "line": 13, - "column": 67 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 327, - 328 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 14, - "column": 5 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 246, - 247 - ], - "loc": { - "start": { - "line": 12, - "column": 21 - }, - "end": { - "line": 12, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cat", - "range": [ - 336, - 339 - ], - "loc": { - "start": { - "line": 14, - "column": 13 - }, - "end": { - "line": 14, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cat", - "range": [ - 241, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json index 0282a0c4..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1123 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "user", - "identifiers": [ - { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "loggedIn", - "range": [ - 23, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "range": [ - 23, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "range": [ - 21, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 14, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "toggle", - "identifiers": [ - { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "loggedIn", - "range": [ - 71, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "range": [ - 66, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "loggedIn", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "range": [ - 83, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 82, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "range": [ - 66, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "range": [ - 66, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 33 - } - } - } - ], - "range": [ - 62, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "params": [], - "range": [ - 44, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 208, - 214 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 208, - 214 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 208, - 214 - ], - "loc": { - "start": { - "line": 14, - "column": 19 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json index 5ab91c95..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,878 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "7", - "value": 7, - "range": [ - 18, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 37, - 38 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 94, - 95 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 37, - 38 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 94, - 95 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 94, - 95 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 140, - 141 - ], - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json index 228ddae8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,748 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "x", - "identifiers": [ - { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "7", - "value": 7, - "range": [ - 18, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 37, - 38 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 90, - 91 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 98, - 99 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 133, - 134 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 37, - 38 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 90, - 91 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 98, - 99 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 98, - 99 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 133, - 134 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "x", - "range": [ - 133, - 134 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 6 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "x", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json index 8a89f21f..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,996 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Outer", - "identifiers": [ - { - "type": "Identifier", - "name": "Outer", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Outer", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Outer", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Outer", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Outer", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handleMessage", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 94, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "range": [ - 88, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 88, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 82, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 82, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 78, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "range": [ - 48, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 141, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 141, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 19 - }, - "end": { - "line": 9, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Outer", - "range": [ - 123, - 128 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Outer", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 94, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "range": [ - 88, - 100 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 101, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 21 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 88, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 82, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 82, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 78, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMessage", - "range": [ - 57, - 70 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - ], - "range": [ - 48, - 110 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 88, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 71, - 76 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 4, - "column": 29 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json index 520e306f..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,873 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "createEventDispatcher", - "identifiers": [ - { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "local": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 77, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "name": "dispatch", - "identifiers": [ - { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 77, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "optional": false, - "range": [ - 77, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 41 - } - } - }, - "range": [ - 66, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - }, - { - "name": "sayHello", - "identifiers": [ - { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'message'", - "value": "message", - "range": [ - 137, - 146 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 153, - 157 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Hello!'", - "value": "Hello!", - "range": [ - 159, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 9 - }, - "end": { - "line": 8, - "column": 17 - } - } - }, - "range": [ - 153, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 17 - } - } - } - ], - "range": [ - 148, - 171 - ], - "loc": { - "start": { - "line": 7, - "column": 22 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 128, - 172 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 4 - } - } - }, - "range": [ - 128, - 173 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 9, - "column": 5 - } - } - } - ], - "range": [ - 124, - 176 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "params": [], - "range": [ - 104, - 176 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 77, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 4, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 19, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 206, - 214 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "sayHello", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 10 - }, - "end": { - "line": 6, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 66, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json index 826f25a6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1367 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Inner", - "identifiers": [ - { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 219, - 224 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "createEventDispatcher", - "identifiers": [ - { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "local": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - }, - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 114, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - } - ] - }, - { - "name": "dispatch", - "identifiers": [ - { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 114, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "optional": false, - "range": [ - 114, - 137 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "range": [ - 103, - 137 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 41 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 169, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "name": "forward", - "identifiers": [ - { - "type": "Identifier", - "name": "forward", - "range": [ - 150, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "forward", - "range": [ - 150, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'message'", - "value": "message", - "range": [ - 178, - 187 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 195, - 201 - ], - "loc": { - "start": { - "line": 8, - "column": 28 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "range": [ - 189, - 201 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 169, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 169, - 202 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "range": [ - 169, - 203 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 36 - } - } - } - ], - "range": [ - 165, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 25 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "forward", - "range": [ - 150, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "range": [ - 141, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "forward", - "range": [ - 237, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "forward", - "range": [ - 150, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 114, - 135 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createEventDispatcher", - "range": [ - 56, - 77 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "forward", - "range": [ - 237, - 244 - ], - "loc": { - "start": { - "line": 12, - "column": 19 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "forward", - "range": [ - 150, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 219, - 224 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'message'", - "value": "message", - "range": [ - 178, - 187 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "detail", - "range": [ - 195, - 201 - ], - "loc": { - "start": { - "line": 8, - "column": 28 - }, - "end": { - "line": 8, - "column": 34 - } - } - }, - "range": [ - 189, - 201 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 169, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "optional": false, - "range": [ - 169, - 202 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 35 - } - } - }, - "range": [ - 169, - 203 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 36 - } - } - } - ], - "range": [ - 165, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 25 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "forward", - "range": [ - 150, - 157 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - ], - "range": [ - 141, - 206 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 169, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 189, - 194 - ], - "loc": { - "start": { - "line": 8, - "column": 22 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 169, - 177 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "dispatch", - "range": [ - 103, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json index ddb7bae8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Inner", - "identifiers": [ - { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Inner", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Inner", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json index 512ec7e3..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,389 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 19, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 19, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'no more alerts'", - "value": "no more alerts", - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 24 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 37, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 37, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 25 - } - } - } - ], - "range": [ - 33, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 4, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 19, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "params": [], - "range": [ - 10, - 63 - ], - "loc": { - "start": { - "line": 2, - "column": 1 - }, - "end": { - "line": 4, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 98, - 109 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 19, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 98, - 109 - ], - "loc": { - "start": { - "line": 7, - "column": 23 - }, - "end": { - "line": 7, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 19, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 37, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json index 0015eaf6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4438 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "scoops", - "identifiers": [ - { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 14, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 374, - 380 - ], - "loc": { - "start": { - "line": 19, - "column": 31 - }, - "end": { - "line": 19, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 453, - 459 - ], - "loc": { - "start": { - "line": 24, - "column": 31 - }, - "end": { - "line": 24, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 533, - 539 - ], - "loc": { - "start": { - "line": 29, - "column": 31 - }, - "end": { - "line": 29, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 44, - "column": 28 - }, - "end": { - "line": 44, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 903, - 909 - ], - "loc": { - "start": { - "line": 48, - "column": 15 - }, - "end": { - "line": 48, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 912, - 918 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - }, - { - "name": "flavours", - "identifiers": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'Mint choc chip'", - "value": "Mint choc chip", - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - } - ], - "range": [ - 42, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "range": [ - 31, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 34 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 663, - 671 - ], - "loc": { - "start": { - "line": 37, - "column": 35 - }, - "end": { - "line": 37, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 726, - 734 - ], - "loc": { - "start": { - "line": 42, - "column": 5 - }, - "end": { - "line": 42, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 802, - 810 - ], - "loc": { - "start": { - "line": 44, - "column": 10 - }, - "end": { - "line": 44, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 958, - 966 - ], - "loc": { - "start": { - "line": 49, - "column": 11 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - }, - { - "name": "join", - "identifiers": [ - { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 126, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 45 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "range": [ - 126, - 137 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 47 - } - } - }, - "range": [ - 119, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 48 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 105, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 96, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 116, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 26 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "range": [ - 96, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "range": [ - 92, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 48 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "', '", - "value": ", ", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 39 - }, - "end": { - "line": 7, - "column": 43 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 166, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 32 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 169, - 171 - ], - "loc": { - "start": { - "line": 7, - "column": 30 - }, - "end": { - "line": 7, - "column": 32 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 151, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 151, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 151, - 172 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "join", - "range": [ - 173, - 177 - ], - "loc": { - "start": { - "line": 7, - "column": 34 - }, - "end": { - "line": 7, - "column": 38 - } - } - }, - "range": [ - 151, - 177 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 38 - } - } - }, - "optional": false, - "range": [ - 151, - 183 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 191, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 52 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 200, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 69 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 209, - 215 - ], - "loc": { - "start": { - "line": 7, - "column": 70 - }, - "end": { - "line": 7, - "column": 76 - } - } - }, - "range": [ - 200, - 215 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 76 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 7, - "column": 79 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 200, - 219 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 191, - 220 - ], - "loc": { - "start": { - "line": 7, - "column": 52 - }, - "end": { - "line": 7, - "column": 81 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 148, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " and ", - "raw": " and " - }, - "range": [ - 183, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 44 - }, - "end": { - "line": 7, - "column": 52 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 220, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 81 - }, - "end": { - "line": 7, - "column": 83 - } - } - } - ], - "range": [ - 148, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 83 - } - } - }, - "range": [ - 141, - 223 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 84 - } - } - } - ], - "range": [ - 88, - 226 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "range": [ - 64, - 226 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "join", - "range": [ - 953, - 957 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - } - } - ] - }, - { - "name": "menu", - "identifiers": [ - { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'Cookies and cream'", - "value": "Cookies and cream", - "range": [ - 243, - 262 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - { - "type": "Literal", - "raw": "'Mint choc chip'", - "value": "Mint choc chip", - "range": [ - 266, - 282 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 18 - } - } - }, - { - "type": "Literal", - "raw": "'Raspberry ripple'", - "value": "Raspberry ripple", - "range": [ - 286, - 304 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 20 - } - } - } - ], - "range": [ - 239, - 307 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 13, - "column": 2 - } - } - }, - "range": [ - 232, - 307 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 13, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 602, - 606 - ], - "loc": { - "start": { - "line": 35, - "column": 7 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 374, - 380 - ], - "loc": { - "start": { - "line": 19, - "column": 31 - }, - "end": { - "line": 19, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 453, - 459 - ], - "loc": { - "start": { - "line": 24, - "column": 31 - }, - "end": { - "line": 24, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 533, - 539 - ], - "loc": { - "start": { - "line": 29, - "column": 31 - }, - "end": { - "line": 29, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 602, - 606 - ], - "loc": { - "start": { - "line": 35, - "column": 7 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 232, - 236 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 726, - 734 - ], - "loc": { - "start": { - "line": 42, - "column": 5 - }, - "end": { - "line": 42, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 802, - 810 - ], - "loc": { - "start": { - "line": 44, - "column": 10 - }, - "end": { - "line": 44, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 44, - "column": 28 - }, - "end": { - "line": 44, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "flavours", - "identifiers": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 126, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 135, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 45 - }, - "end": { - "line": 6, - "column": 46 - } - } - }, - "range": [ - 126, - 137 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 47 - } - } - }, - "range": [ - 119, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 29 - }, - "end": { - "line": 6, - "column": 48 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 105, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 15 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 96, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 116, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 26 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "range": [ - 96, - 117 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 27 - } - } - }, - "range": [ - 92, - 138 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 48 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "', '", - "value": ", ", - "range": [ - 178, - 182 - ], - "loc": { - "start": { - "line": 7, - "column": 39 - }, - "end": { - "line": 7, - "column": 43 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 166, - 167 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 170, - 171 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 32 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 169, - 171 - ], - "loc": { - "start": { - "line": 7, - "column": 30 - }, - "end": { - "line": 7, - "column": 32 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 151, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 160, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 21 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "range": [ - 151, - 165 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 151, - 172 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "join", - "range": [ - 173, - 177 - ], - "loc": { - "start": { - "line": 7, - "column": 34 - }, - "end": { - "line": 7, - "column": 38 - } - } - }, - "range": [ - 151, - 177 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 38 - } - } - }, - "optional": false, - "range": [ - 151, - 183 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 191, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 52 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 200, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 69 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 209, - 215 - ], - "loc": { - "start": { - "line": 7, - "column": 70 - }, - "end": { - "line": 7, - "column": 76 - } - } - }, - "range": [ - 200, - 215 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 76 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 7, - "column": 79 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 200, - 219 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 80 - } - } - }, - "range": [ - 191, - 220 - ], - "loc": { - "start": { - "line": 7, - "column": 52 - }, - "end": { - "line": 7, - "column": 81 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 148, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 12 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " and ", - "raw": " and " - }, - "range": [ - 183, - 191 - ], - "loc": { - "start": { - "line": 7, - "column": 44 - }, - "end": { - "line": 7, - "column": 52 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 220, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 81 - }, - "end": { - "line": 7, - "column": 83 - } - } - } - ], - "range": [ - 148, - 222 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 83 - } - } - }, - "range": [ - 141, - 223 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 84 - } - } - } - ], - "range": [ - 88, - 226 - ], - "loc": { - "start": { - "line": 5, - "column": 25 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "range": [ - 64, - 226 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 126, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 151, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 191, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 52 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 200, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 69 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 126, - 134 - ], - "loc": { - "start": { - "line": 6, - "column": 36 - }, - "end": { - "line": 6, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 151, - 159 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 191, - 199 - ], - "loc": { - "start": { - "line": 7, - "column": 52 - }, - "end": { - "line": 7, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 200, - 208 - ], - "loc": { - "start": { - "line": 7, - "column": 61 - }, - "end": { - "line": 7, - "column": 69 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 78, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "flavour", - "identifiers": [ - { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "menu", - "range": [ - 602, - 606 - ], - "loc": { - "start": { - "line": 35, - "column": 7 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "context": { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "label", - "range": [ - 621, - 626 - ], - "loc": { - "start": { - "line": 36, - "column": 2 - }, - "end": { - "line": 36, - "column": 7 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 620, - 627 - ], - "loc": { - "start": { - "line": 36, - "column": 1 - }, - "end": { - "line": 36, - "column": 8 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 627, - 630 - ], - "loc": { - "start": { - "line": 36, - "column": 8 - }, - "end": { - "line": 37, - "column": 2 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "input", - "range": [ - 631, - 636 - ], - "loc": { - "start": { - "line": 37, - "column": 3 - }, - "end": { - "line": 37, - "column": 8 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "type", - "range": [ - 637, - 641 - ], - "loc": { - "start": { - "line": 37, - "column": 9 - }, - "end": { - "line": 37, - "column": 13 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "checkbox", - "range": [ - 642, - 650 - ], - "loc": { - "start": { - "line": 37, - "column": 14 - }, - "end": { - "line": 37, - "column": 22 - } - } - } - ], - "range": [ - 637, - 650 - ], - "loc": { - "start": { - "line": 37, - "column": 9 - }, - "end": { - "line": 37, - "column": 22 - } - } - }, - { - "type": "SvelteDirective", - "kind": "Binding", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "group", - "range": [ - 656, - 661 - ], - "loc": { - "start": { - "line": 37, - "column": 28 - }, - "end": { - "line": 37, - "column": 33 - } - } - }, - "modifiers": [], - "range": [ - 651, - 661 - ], - "loc": { - "start": { - "line": 37, - "column": 23 - }, - "end": { - "line": 37, - "column": 33 - } - } - }, - "expression": { - "type": "Identifier", - "name": "flavours", - "range": [ - 663, - 671 - ], - "loc": { - "start": { - "line": 37, - "column": 35 - }, - "end": { - "line": 37, - "column": 43 - } - } - }, - "shorthand": false, - "range": [ - 651, - 672 - ], - "loc": { - "start": { - "line": 37, - "column": 23 - }, - "end": { - "line": 37, - "column": 44 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "value", - "range": [ - 673, - 678 - ], - "loc": { - "start": { - "line": 37, - "column": 45 - }, - "end": { - "line": 37, - "column": 50 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "flavour", - "range": [ - 680, - 687 - ], - "loc": { - "start": { - "line": 37, - "column": 52 - }, - "end": { - "line": 37, - "column": 59 - } - } - }, - "range": [ - 679, - 688 - ], - "loc": { - "start": { - "line": 37, - "column": 51 - }, - "end": { - "line": 37, - "column": 60 - } - } - } - ], - "range": [ - 673, - 688 - ], - "loc": { - "start": { - "line": 37, - "column": 45 - }, - "end": { - "line": 37, - "column": 60 - } - } - } - ], - "selfClosing": false, - "range": [ - 630, - 689 - ], - "loc": { - "start": { - "line": 37, - "column": 2 - }, - "end": { - "line": 37, - "column": 61 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 630, - 689 - ], - "loc": { - "start": { - "line": 37, - "column": 2 - }, - "end": { - "line": 37, - "column": 61 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 689, - 692 - ], - "loc": { - "start": { - "line": 37, - "column": 61 - }, - "end": { - "line": 38, - "column": 2 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "flavour", - "range": [ - 693, - 700 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "range": [ - 692, - 701 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 11 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 701, - 703 - ], - "loc": { - "start": { - "line": 38, - "column": 11 - }, - "end": { - "line": 39, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 703, - 711 - ], - "loc": { - "start": { - "line": 39, - "column": 1 - }, - "end": { - "line": 39, - "column": 9 - } - } - }, - "range": [ - 620, - 711 - ], - "loc": { - "start": { - "line": 36, - "column": 1 - }, - "end": { - "line": 39, - "column": 9 - } - } - } - ], - "else": null, - "range": [ - 595, - 719 - ], - "loc": { - "start": { - "line": 35, - "column": 0 - }, - "end": { - "line": 40, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 680, - 687 - ], - "loc": { - "start": { - "line": 37, - "column": 52 - }, - "end": { - "line": 37, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 693, - 700 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 663, - 671 - ], - "loc": { - "start": { - "line": 37, - "column": 35 - }, - "end": { - "line": 37, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 680, - 687 - ], - "loc": { - "start": { - "line": 37, - "column": 52 - }, - "end": { - "line": 37, - "column": 59 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 693, - 700 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 610, - 617 - ], - "loc": { - "start": { - "line": 35, - "column": 15 - }, - "end": { - "line": 35, - "column": 22 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 663, - 671 - ], - "loc": { - "start": { - "line": 37, - "column": 35 - }, - "end": { - "line": 37, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 903, - 909 - ], - "loc": { - "start": { - "line": 48, - "column": 15 - }, - "end": { - "line": 48, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 912, - 918 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "join", - "range": [ - 953, - 957 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 958, - 966 - ], - "loc": { - "start": { - "line": 49, - "column": 11 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 903, - 909 - ], - "loc": { - "start": { - "line": 48, - "column": 15 - }, - "end": { - "line": 48, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 912, - 918 - ], - "loc": { - "start": { - "line": 48, - "column": 24 - }, - "end": { - "line": 48, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "join", - "range": [ - 953, - 957 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "join", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 958, - 966 - ], - "loc": { - "start": { - "line": 49, - "column": 11 - }, - "end": { - "line": 49, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json index 3a667796..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,303 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "string", - "identifiers": [ - { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "init": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "this string contains some HTML!!!", - "raw": "this string contains some HTML!!!" - }, - "range": [ - 23, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 66 - } - } - } - ], - "range": [ - 23, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 66 - } - } - }, - "range": [ - 14, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 66 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 92, - 98 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 92, - 98 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json index a4d7b8f6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,303 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "string", - "identifiers": [ - { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "init": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "this string contains some HTML!!!", - "raw": "this string contains some HTML!!!" - }, - "range": [ - 23, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 66 - } - } - } - ], - "range": [ - 23, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 66 - } - } - }, - "range": [ - 14, - 75 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 66 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "string", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "string", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json index 5511b08b..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1203 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "user", - "identifiers": [ - { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "loggedIn", - "range": [ - 23, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 33, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 29 - } - } - }, - "range": [ - 23, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 29 - } - } - } - ], - "range": [ - 21, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 14, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 194, - 198 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "name": "toggle", - "identifiers": [ - { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "loggedIn", - "range": [ - 71, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "range": [ - 66, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "operator": "=", - "right": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "loggedIn", - "range": [ - 88, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "range": [ - 83, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 82, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "range": [ - 66, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 32 - } - } - }, - "range": [ - 66, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 33 - } - } - } - ], - "range": [ - 62, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "params": [], - "range": [ - 44, - 100 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 117, - 121 - ], - "loc": { - "start": { - "line": 9, - "column": 5 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 194, - 198 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 66, - 70 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "user", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "user", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 151, - 157 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 53, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json index 1c40e5a2..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,812 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "fade", - "identifiers": [ - { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 224, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 46 - }, - "end": { - "line": 12, - "column": 50 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "fly", - "identifiers": [ - { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "local": { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 72, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "range": [ - 62, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 135, - 142 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 169, - 176 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 135, - 142 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 169, - 176 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 62, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 224, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 46 - }, - "end": { - "line": 12, - "column": 50 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 185, - 188 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 25, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 224, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 46 - }, - "end": { - "line": 12, - "column": 50 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json index d14c7bc2..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2344 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "m", - "identifiers": [ - { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 20, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 20, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - "range": [ - 26, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 21 - } - } - } - ], - "range": [ - 18, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - "range": [ - 14, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 23 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 209, - 210 - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 271, - 272 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 279, - 280 - ], - "loc": { - "start": { - "line": 15, - "column": 32 - }, - "end": { - "line": 15, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "handleMousemove", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 74, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 84, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 92 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 97, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientY", - "range": [ - 107, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 101, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "range": [ - 68, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 33 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 36, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 271, - 272 - ], - "loc": { - "start": { - "line": 15, - "column": 24 - }, - "end": { - "line": 15, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 279, - 280 - ], - "loc": { - "start": { - "line": 15, - "column": 32 - }, - "end": { - "line": 15, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "x", - "range": [ - 74, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 84, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 78, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 72, - 92 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "y", - "range": [ - 97, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientY", - "range": [ - 107, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 101, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 114 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - "range": [ - 95, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 22 - } - } - } - ], - "range": [ - 68, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 33 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 45, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - ], - "range": [ - 36, - 118 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 61, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 31 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 72, - 73 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "m", - "range": [ - 209, - 210 - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "operator": "=", - "right": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 215, - 216 - ], - "loc": { - "start": { - "line": 14, - "column": 31 - }, - "end": { - "line": 14, - "column": 32 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 14, - "column": 34 - }, - "end": { - "line": 14, - "column": 35 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 220, - 227 - ], - "loc": { - "start": { - "line": 14, - "column": 36 - }, - "end": { - "line": 14, - "column": 43 - } - } - }, - "range": [ - 218, - 227 - ], - "loc": { - "start": { - "line": 14, - "column": 34 - }, - "end": { - "line": 14, - "column": 43 - } - } - }, - "range": [ - 215, - 227 - ], - "loc": { - "start": { - "line": 14, - "column": 31 - }, - "end": { - "line": 14, - "column": 43 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 229, - 230 - ], - "loc": { - "start": { - "line": 14, - "column": 45 - }, - "end": { - "line": 14, - "column": 46 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 232, - 233 - ], - "loc": { - "start": { - "line": 14, - "column": 48 - }, - "end": { - "line": 14, - "column": 49 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientY", - "range": [ - 234, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 50 - }, - "end": { - "line": 14, - "column": 57 - } - } - }, - "range": [ - 232, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 48 - }, - "end": { - "line": 14, - "column": 57 - } - } - }, - "range": [ - 229, - 241 - ], - "loc": { - "start": { - "line": 14, - "column": 45 - }, - "end": { - "line": 14, - "column": 57 - } - } - } - ], - "range": [ - 213, - 243 - ], - "loc": { - "start": { - "line": 14, - "column": 29 - }, - "end": { - "line": 14, - "column": 59 - } - } - }, - "range": [ - 209, - 243 - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 14, - "column": 59 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - ], - "range": [ - 204, - 243 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 59 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 14, - "column": 34 - }, - "end": { - "line": 14, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 232, - 233 - ], - "loc": { - "start": { - "line": 14, - "column": 48 - }, - "end": { - "line": 14, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 209, - 210 - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 14, - "column": 34 - }, - "end": { - "line": 14, - "column": 35 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 232, - 233 - ], - "loc": { - "start": { - "line": 14, - "column": 48 - }, - "end": { - "line": 14, - "column": 49 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 204, - 205 - ], - "loc": { - "start": { - "line": 14, - "column": 20 - }, - "end": { - "line": 14, - "column": 21 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "m", - "range": [ - 209, - 210 - ], - "loc": { - "start": { - "line": 14, - "column": 25 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "m", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json index e790a128..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2247 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Thing", - "identifiers": [ - { - "type": "Identifier", - "name": "Thing", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Thing", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Thing", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Thing", - "range": [ - 387, - 392 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Thing", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "things", - "identifiers": [ - { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 67, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 71, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "range": [ - 67, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'darkblue'", - "value": "darkblue", - "range": [ - 81, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 28 - } - } - }, - "range": [ - 74, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 28 - } - } - } - ], - "range": [ - 65, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 30 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 99, - 101 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "range": [ - 99, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 106, - 111 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'indigo'", - "value": "indigo", - "range": [ - 113, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 18 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - "range": [ - 106, - 121 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 26 - } - } - } - ], - "range": [ - 97, - 123 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 129, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 133, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "range": [ - 129, - 134 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 136, - 141 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'deeppink'", - "value": "deeppink", - "range": [ - 143, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "range": [ - 136, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 28 - } - } - } - ], - "range": [ - 127, - 155 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 161, - 163 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 165, - 166 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "range": [ - 161, - 166 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 168, - 173 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'salmon'", - "value": "salmon", - "range": [ - 175, - 183 - ], - "loc": { - "start": { - "line": 8, - "column": 18 - }, - "end": { - "line": 8, - "column": 26 - } - } - }, - "range": [ - 168, - 183 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 26 - } - } - } - ], - "range": [ - 159, - 185 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 28 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 191, - 193 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "5", - "value": 5, - "range": [ - 195, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 8 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "range": [ - 191, - 196 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 198, - 203 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'gold'", - "value": "gold", - "range": [ - 205, - 211 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "range": [ - 198, - 211 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 24 - } - } - } - ], - "range": [ - 189, - 213 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 26 - } - } - } - ], - "range": [ - 61, - 216 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "range": [ - 52, - 216 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 247, - 253 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 256, - 262 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 357, - 363 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 229, - 240 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 229, - 240 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "things", - "range": [ - 247, - 253 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 269, - 270 - ], - "loc": { - "start": { - "line": 13, - "column": 24 - }, - "end": { - "line": 13, - "column": 25 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "things", - "range": [ - 256, - 262 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 263, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "range": [ - 256, - 268 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 23 - } - } - }, - "optional": false, - "range": [ - 256, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "range": [ - 247, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "range": [ - 247, - 272 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 27 - } - } - } - ], - "range": [ - 243, - 275 - ], - "loc": { - "start": { - "line": 12, - "column": 24 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 229, - 240 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, - "params": [], - "range": [ - 220, - 275 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 305, - 316 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 229, - 240 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 305, - 316 - ], - "loc": { - "start": { - "line": 17, - "column": 18 - }, - "end": { - "line": 17, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 229, - 240 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 357, - 363 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 247, - 253 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 256, - 262 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 247, - 253 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "things", - "range": [ - 256, - 262 - ], - "loc": { - "start": { - "line": 13, - "column": 11 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "things", - "range": [ - 52, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "thing", - "identifiers": [ - { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "things", - "range": [ - 357, - 363 - ], - "loc": { - "start": { - "line": 21, - "column": 7 - }, - "end": { - "line": 21, - "column": 13 - } - } - }, - "context": { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "index": null, - "key": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "thing", - "range": [ - 374, - 379 - ], - "loc": { - "start": { - "line": 21, - "column": 24 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 380, - 382 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "range": [ - 374, - 382 - ], - "loc": { - "start": { - "line": 21, - "column": 24 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Thing", - "range": [ - 387, - 392 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 7 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "current", - "range": [ - 393, - 400 - ], - "loc": { - "start": { - "line": 22, - "column": 8 - }, - "end": { - "line": 22, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "thing", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 22, - "column": 17 - }, - "end": { - "line": 22, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "color", - "range": [ - 408, - 413 - ], - "loc": { - "start": { - "line": 22, - "column": 23 - }, - "end": { - "line": 22, - "column": 28 - } - } - }, - "range": [ - 402, - 413 - ], - "loc": { - "start": { - "line": 22, - "column": 17 - }, - "end": { - "line": 22, - "column": 28 - } - } - }, - "range": [ - 401, - 414 - ], - "loc": { - "start": { - "line": 22, - "column": 16 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - ], - "range": [ - 393, - 414 - ], - "loc": { - "start": { - "line": 22, - "column": 8 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - ], - "selfClosing": true, - "range": [ - 386, - 416 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 31 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 386, - 416 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 31 - } - } - } - ], - "else": null, - "range": [ - 350, - 424 - ], - "loc": { - "start": { - "line": 21, - "column": 0 - }, - "end": { - "line": 23, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "thing", - "range": [ - 374, - 379 - ], - "loc": { - "start": { - "line": 21, - "column": 24 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "thing", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 22, - "column": 17 - }, - "end": { - "line": 22, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "thing", - "range": [ - 374, - 379 - ], - "loc": { - "start": { - "line": 21, - "column": 24 - }, - "end": { - "line": 21, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "thing", - "range": [ - 402, - 407 - ], - "loc": { - "start": { - "line": 22, - "column": 17 - }, - "end": { - "line": 22, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "thing", - "range": [ - 367, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 17 - }, - "end": { - "line": 21, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Thing", - "range": [ - 387, - 392 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Thing", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Thing", - "range": [ - 387, - 392 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 22, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Thing", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json index e1c7a138..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2002 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "slide", - "identifiers": [ - { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "slide", - "range": [ - 483, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "showItems", - "identifiers": [ - { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "range": [ - 59, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showItems", - "range": [ - 318, - 327 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 17, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showItems", - "range": [ - 419, - 428 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - } - ] - }, - { - "name": "i", - "identifiers": [ - { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "5", - "value": 5, - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 392, - 393 - ], - "loc": { - "start": { - "line": 22, - "column": 33 - }, - "end": { - "line": 22, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - } - ] - }, - { - "name": "items", - "identifiers": [ - { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'one'", - "value": "one", - "range": [ - 103, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - { - "type": "Literal", - "raw": "'two'", - "value": "two", - "range": [ - 110, - 115 - ], - "loc": { - "start": { - "line": 6, - "column": 21 - }, - "end": { - "line": 6, - "column": 26 - } - } - }, - { - "type": "Literal", - "raw": "'three'", - "value": "three", - "range": [ - 117, - 124 - ], - "loc": { - "start": { - "line": 6, - "column": 28 - }, - "end": { - "line": 6, - "column": 35 - } - } - }, - { - "type": "Literal", - "raw": "'four'", - "value": "four", - "range": [ - 126, - 132 - ], - "loc": { - "start": { - "line": 6, - "column": 37 - }, - "end": { - "line": 6, - "column": 43 - } - } - }, - { - "type": "Literal", - "raw": "'five'", - "value": "five", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 6, - "column": 45 - }, - "end": { - "line": 6, - "column": 51 - } - } - }, - { - "type": "Literal", - "raw": "'six'", - "value": "six", - "range": [ - 142, - 147 - ], - "loc": { - "start": { - "line": 6, - "column": 53 - }, - "end": { - "line": 6, - "column": 58 - } - } - }, - { - "type": "Literal", - "raw": "'seven'", - "value": "seven", - "range": [ - 149, - 156 - ], - "loc": { - "start": { - "line": 6, - "column": 60 - }, - "end": { - "line": 6, - "column": 67 - } - } - }, - { - "type": "Literal", - "raw": "'eight'", - "value": "eight", - "range": [ - 158, - 165 - ], - "loc": { - "start": { - "line": 6, - "column": 69 - }, - "end": { - "line": 6, - "column": 76 - } - } - }, - { - "type": "Literal", - "raw": "'nine'", - "value": "nine", - "range": [ - 167, - 173 - ], - "loc": { - "start": { - "line": 6, - "column": 78 - }, - "end": { - "line": 6, - "column": 84 - } - } - }, - { - "type": "Literal", - "raw": "'ten'", - "value": "ten", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 6, - "column": 86 - }, - "end": { - "line": 6, - "column": 91 - } - } - } - ], - "range": [ - 102, - 181 - ], - "loc": { - "start": { - "line": 6, - "column": 13 - }, - "end": { - "line": 6, - "column": 92 - } - } - }, - "range": [ - 94, - 181 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 92 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showItems", - "range": [ - 318, - 327 - ], - "loc": { - "start": { - "line": 17, - "column": 38 - }, - "end": { - "line": 17, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 392, - 393 - ], - "loc": { - "start": { - "line": 22, - "column": 33 - }, - "end": { - "line": 22, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showItems", - "range": [ - 419, - 428 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showItems", - "range": [ - 59, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "item", - "identifiers": [ - { - "type": "Identifier", - "name": "item", - "range": [ - 459, - 463 - ], - "loc": { - "start": { - "line": 27, - "column": 29 - }, - "end": { - "line": 27, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "item", - "range": [ - 459, - 463 - ], - "loc": { - "start": { - "line": 27, - "column": 29 - }, - "end": { - "line": 27, - "column": 33 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 450, - 451 - ], - "loc": { - "start": { - "line": 27, - "column": 20 - }, - "end": { - "line": 27, - "column": 21 - } - } - }, - { - "type": "Identifier", - "name": "i", - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 24 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "items", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 444, - 449 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 19 - } - } - }, - "range": [ - 438, - 449 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 438, - 455 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 25 - } - } - }, - "context": { - "type": "Identifier", - "name": "item", - "range": [ - 459, - 463 - ], - "loc": { - "start": { - "line": 27, - "column": 29 - }, - "end": { - "line": 27, - "column": 33 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 468, - 471 - ], - "loc": { - "start": { - "line": 28, - "column": 3 - }, - "end": { - "line": 28, - "column": 6 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Transition", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "Identifier", - "name": "slide", - "range": [ - 483, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 23 - } - } - }, - "modifiers": [ - "local" - ], - "range": [ - 472, - 494 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 29 - } - } - }, - "intro": true, - "outro": true, - "expression": null, - "range": [ - 472, - 494 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 29 - } - } - } - ], - "selfClosing": false, - "range": [ - 467, - 495 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 30 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 495, - 499 - ], - "loc": { - "start": { - "line": 28, - "column": 30 - }, - "end": { - "line": 29, - "column": 3 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "item", - "range": [ - 500, - 504 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "range": [ - 499, - 505 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 29, - "column": 9 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 505, - 508 - ], - "loc": { - "start": { - "line": 29, - "column": 9 - }, - "end": { - "line": 30, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 508, - 514 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 8 - } - } - }, - "range": [ - 467, - 514 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 30, - "column": 8 - } - } - } - ], - "else": null, - "range": [ - 431, - 523 - ], - "loc": { - "start": { - "line": 27, - "column": 1 - }, - "end": { - "line": 31, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 500, - 504 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 459, - 463 - ], - "loc": { - "start": { - "line": 27, - "column": 29 - }, - "end": { - "line": 27, - "column": 33 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "slide", - "range": [ - 483, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "item", - "range": [ - 500, - 504 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "item", - "range": [ - 459, - 463 - ], - "loc": { - "start": { - "line": 27, - "column": 29 - }, - "end": { - "line": 27, - "column": 33 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "slide", - "range": [ - 483, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "items", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 27, - "column": 8 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "items", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "i", - "range": [ - 453, - 454 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 24 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "i", - "range": [ - 82, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "slide", - "range": [ - 483, - 488 - ], - "loc": { - "start": { - "line": 28, - "column": 18 - }, - "end": { - "line": 28, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "slide", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json index 231d7bf1..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,13428 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "time", - "identifiers": [ - { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 75, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "range": [ - 68, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 2368, - 2372 - ], - "loc": { - "start": { - "line": 116, - "column": 20 - }, - "end": { - "line": 116, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 2539, - 2543 - ], - "loc": { - "start": { - "line": 123, - "column": 21 - }, - "end": { - "line": 123, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 2617, - 2621 - ], - "loc": { - "start": { - "line": 126, - "column": 30 - }, - "end": { - "line": 126, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - }, - { - "name": "duration", - "identifiers": [ - { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "init": null, - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 468, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 7 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 576, - 584 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2381, - 2389 - ], - "loc": { - "start": { - "line": 117, - "column": 7 - }, - "end": { - "line": 117, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2482, - 2490 - ], - "loc": { - "start": { - "line": 122, - "column": 40 - }, - "end": { - "line": 122, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2546, - 2554 - ], - "loc": { - "start": { - "line": 123, - "column": 28 - }, - "end": { - "line": 123, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2738, - 2746 - ], - "loc": { - "start": { - "line": 128, - "column": 30 - }, - "end": { - "line": 128, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - }, - { - "name": "paused", - "identifiers": [ - { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 107, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 98, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 2397, - 2403 - ], - "loc": { - "start": { - "line": 118, - "column": 7 - }, - "end": { - "line": 118, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 2659, - 2665 - ], - "loc": { - "start": { - "line": 127, - "column": 28 - }, - "end": { - "line": 127, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - }, - { - "name": "showControls", - "identifiers": [ - { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 134, - 138 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 24 - } - } - }, - "range": [ - 119, - 138 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 389, - 401 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 2494, - 2506 - ], - "loc": { - "start": { - "line": 122, - "column": 52 - }, - "end": { - "line": 122, - "column": 64 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ] - }, - { - "name": "showControlsTimeout", - "identifiers": [ - { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "init": null, - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 319, - 338 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - } - ] - }, - { - "name": "handleMousemove", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 177, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 177, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "clearTimeout", - "range": [ - 282, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 282, - 315 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "range": [ - 282, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 36 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 319, - 338 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "showControls", - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 373, - 378 - ], - "loc": { - "start": { - "line": 14, - "column": 56 - }, - "end": { - "line": 14, - "column": 61 - } - } - }, - "range": [ - 358, - 378 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 61 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 352, - 378 - ], - "loc": { - "start": { - "line": 14, - "column": 35 - }, - "end": { - "line": 14, - "column": 61 - } - } - }, - { - "type": "Literal", - "raw": "2500", - "value": 2500, - "range": [ - 380, - 384 - ], - "loc": { - "start": { - "line": 14, - "column": 63 - }, - "end": { - "line": 14, - "column": 67 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 341, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 68 - } - } - }, - "range": [ - 319, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 68 - } - } - }, - "range": [ - 319, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 69 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "showControls", - "range": [ - 389, - 401 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 404, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 389, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 389, - 409 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 22 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 435, - 442 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "buttons", - "range": [ - 421, - 428 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "range": [ - 419, - 428 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "operator": "&", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 431, - 432 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 419, - 432 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 417, - 433 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 22 - } - } - }, - "range": [ - 413, - 442 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 478, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "duration", - "range": [ - 468, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 7 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 467, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "range": [ - 463, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - ], - "range": [ - 519, - 534 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 537, - 541 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getBoundingClientRect", - "range": [ - 542, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "range": [ - 537, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "optional": false, - "range": [ - 537, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 54 - } - } - }, - "range": [ - 519, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 54 - } - } - } - ], - "range": [ - 513, - 566 - ], - "loc": { - "start": { - "line": 20, - "column": 2 - }, - "end": { - "line": 20, - "column": 55 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "time", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "duration", - "range": [ - 576, - 584 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 17 - } - } - }, - "operator": "*", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 588, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 590, - 597 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 30 - } - } - }, - "range": [ - 588, - 597 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 30 - } - } - }, - "operator": "-", - "right": { - "type": "Identifier", - "name": "left", - "range": [ - 600, - 604 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "range": [ - 588, - 604 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "range": [ - 576, - 605 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 38 - } - } - }, - "operator": "/", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "right", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 21, - "column": 42 - }, - "end": { - "line": 21, - "column": 47 - } - } - }, - "operator": "-", - "right": { - "type": "Identifier", - "name": "left", - "range": [ - 617, - 621 - ], - "loc": { - "start": { - "line": 21, - "column": 50 - }, - "end": { - "line": 21, - "column": 54 - } - } - }, - "range": [ - 609, - 621 - ], - "loc": { - "start": { - "line": 21, - "column": 42 - }, - "end": { - "line": 21, - "column": 54 - } - } - }, - "range": [ - 576, - 622 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 55 - } - } - }, - "range": [ - 569, - 622 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 55 - } - } - }, - "range": [ - 569, - 623 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 56 - } - } - } - ], - "range": [ - 196, - 626 - ], - "loc": { - "start": { - "line": 10, - "column": 29 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 177, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - ], - "range": [ - 168, - 626 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 2298, - 2313 - ], - "loc": { - "start": { - "line": 114, - "column": 16 - }, - "end": { - "line": 114, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 177, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 25 - } - } - } - } - ] - }, - { - "name": "handleMousedown", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 638, - 653 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 638, - 653 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 853, - 854 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 855, - 861 - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - "range": [ - 853, - 861 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 862, - 867 - ], - "loc": { - "start": { - "line": 30, - "column": 17 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - "range": [ - 853, - 867 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 853, - 869 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 24 - } - } - }, - "range": [ - 853, - 870 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 828, - 829 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 830, - 836 - ], - "loc": { - "start": { - "line": 29, - "column": 17 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "range": [ - 828, - 836 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "play", - "range": [ - 837, - 841 - ], - "loc": { - "start": { - "line": 29, - "column": 24 - }, - "end": { - "line": 29, - "column": 28 - } - } - }, - "range": [ - 828, - 841 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 828, - 843 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 30 - } - } - }, - "range": [ - 828, - 844 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 31 - } - } - }, - "test": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "range": [ - 816, - 870 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "cancel", - "range": [ - 874, - 880 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "optional": false, - "range": [ - 874, - 882 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "range": [ - 874, - 883 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 12 - } - } - } - ], - "range": [ - 811, - 887 - ], - "loc": { - "start": { - "line": 28, - "column": 27 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - }, - "params": [], - "range": [ - 786, - 887 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'mouseup'", - "value": "mouseup", - "range": [ - 943, - 952 - ], - "loc": { - "start": { - "line": 35, - "column": 32 - }, - "end": { - "line": 35, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 954, - 967 - ], - "loc": { - "start": { - "line": 35, - "column": 43 - }, - "end": { - "line": 35, - "column": 56 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 914, - 915 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 916, - 922 - ], - "loc": { - "start": { - "line": 35, - "column": 5 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "range": [ - 914, - 922 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "removeEventListener", - "range": [ - 923, - 942 - ], - "loc": { - "start": { - "line": 35, - "column": 12 - }, - "end": { - "line": 35, - "column": 31 - } - } - }, - "range": [ - 914, - 942 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 914, - 968 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 57 - } - } - }, - "range": [ - 914, - 969 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 58 - } - } - } - ], - "range": [ - 909, - 973 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 36, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - }, - "params": [], - "range": [ - 891, - 973 - ], - "loc": { - "start": { - "line": 34, - "column": 2 - }, - "end": { - "line": 36, - "column": 3 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'mouseup'", - "value": "mouseup", - "range": [ - 1003, - 1012 - ], - "loc": { - "start": { - "line": 38, - "column": 28 - }, - "end": { - "line": 38, - "column": 37 - } - } - }, - { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 1014, - 1027 - ], - "loc": { - "start": { - "line": 38, - "column": 39 - }, - "end": { - "line": 38, - "column": 52 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 977, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 979, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 4 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "range": [ - 977, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "addEventListener", - "range": [ - 986, - 1002 - ], - "loc": { - "start": { - "line": 38, - "column": 11 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 977, - 1002 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "optional": false, - "range": [ - 977, - 1028 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 53 - } - } - }, - "range": [ - 977, - 1029 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 54 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "cancel", - "range": [ - 1044, - 1050 - ], - "loc": { - "start": { - "line": 40, - "column": 13 - }, - "end": { - "line": 40, - "column": 19 - } - } - }, - { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 1052, - 1055 - ], - "loc": { - "start": { - "line": 40, - "column": 21 - }, - "end": { - "line": 40, - "column": 24 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 1033, - 1043 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 1033, - 1056 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 25 - } - } - }, - "range": [ - 1033, - 1057 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 26 - } - } - } - ], - "range": [ - 657, - 1060 - ], - "loc": { - "start": { - "line": 24, - "column": 29 - }, - "end": { - "line": 41, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 638, - 653 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - ], - "range": [ - 629, - 1060 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 41, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 2331, - 2346 - ], - "loc": { - "start": { - "line": 115, - "column": 16 - }, - "end": { - "line": 115, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 638, - 653 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 25 - } - } - } - } - ] - }, - { - "name": "format", - "identifiers": [ - { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "Literal", - "raw": "'...'", - "value": "...", - "range": [ - 1119, - 1124 - ], - "loc": { - "start": { - "line": 44, - "column": 29 - }, - "end": { - "line": 44, - "column": 34 - } - } - }, - "range": [ - 1112, - 1125 - ], - "loc": { - "start": { - "line": 44, - "column": 22 - }, - "end": { - "line": 44, - "column": 35 - } - } - }, - "test": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1102, - 1109 - ], - "loc": { - "start": { - "line": 44, - "column": 12 - }, - "end": { - "line": 44, - "column": 19 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "isNaN", - "range": [ - 1096, - 1101 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 11 - } - } - }, - "optional": false, - "range": [ - 1096, - 1110 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 20 - } - } - }, - "range": [ - 1092, - 1125 - ], - "loc": { - "start": { - "line": 44, - "column": 2 - }, - "end": { - "line": 44, - "column": 35 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 36 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "60", - "value": 60, - "range": [ - 1166, - 1168 - ], - "loc": { - "start": { - "line": 46, - "column": 39 - }, - "end": { - "line": 46, - "column": 41 - } - } - }, - "range": [ - 1156, - 1168 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 41 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "floor", - "range": [ - 1150, - 1155 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 28 - } - } - }, - "range": [ - 1145, - 1155 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 1145, - 1169 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 42 - } - } - }, - "range": [ - 1135, - 1169 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 42 - } - } - } - ], - "range": [ - 1129, - 1170 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 43 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1173, - 1180 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1194, - 1201 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 30 - } - } - }, - "operator": "%", - "right": { - "type": "Literal", - "raw": "60", - "value": 60, - "range": [ - 1204, - 1206 - ], - "loc": { - "start": { - "line": 47, - "column": 33 - }, - "end": { - "line": 47, - "column": 35 - } - } - }, - "range": [ - 1194, - 1206 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 35 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 1183, - 1187 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "floor", - "range": [ - 1188, - 1193 - ], - "loc": { - "start": { - "line": 47, - "column": 17 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "range": [ - 1183, - 1193 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1183, - 1207 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 36 - } - } - }, - "range": [ - 1173, - 1207 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 36 - } - } - }, - "range": [ - 1173, - 1208 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 37 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1229, - 1236 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 27 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "'0'", - "value": "0", - "range": [ - 1239, - 1242 - ], - "loc": { - "start": { - "line": 48, - "column": 30 - }, - "end": { - "line": 48, - "column": 33 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1245, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 36 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "range": [ - 1239, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 30 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "range": [ - 1229, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "range": [ - 1229, - 1253 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 44 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1215, - 1222 - ], - "loc": { - "start": { - "line": 48, - "column": 6 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "operator": "<", - "right": { - "type": "Literal", - "raw": "10", - "value": 10, - "range": [ - 1225, - 1227 - ], - "loc": { - "start": { - "line": 48, - "column": 16 - }, - "end": { - "line": 48, - "column": 18 - } - } - }, - "range": [ - 1215, - 1227 - ], - "loc": { - "start": { - "line": 48, - "column": 6 - }, - "end": { - "line": 48, - "column": 18 - } - } - }, - "range": [ - 1211, - 1253 - ], - "loc": { - "start": { - "line": 48, - "column": 2 - }, - "end": { - "line": 48, - "column": 44 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "minutes", - "range": [ - 1267, - 1274 - ], - "loc": { - "start": { - "line": 50, - "column": 12 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1278, - 1285 - ], - "loc": { - "start": { - "line": 50, - "column": 23 - }, - "end": { - "line": 50, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 1264, - 1267 - ], - "loc": { - "start": { - "line": 50, - "column": 9 - }, - "end": { - "line": 50, - "column": 12 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ":", - "raw": ":" - }, - "range": [ - 1274, - 1278 - ], - "loc": { - "start": { - "line": 50, - "column": 19 - }, - "end": { - "line": 50, - "column": 23 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 1285, - 1287 - ], - "loc": { - "start": { - "line": 50, - "column": 30 - }, - "end": { - "line": 50, - "column": 32 - } - } - } - ], - "range": [ - 1264, - 1287 - ], - "loc": { - "start": { - "line": 50, - "column": 9 - }, - "end": { - "line": 50, - "column": 32 - } - } - }, - "range": [ - 1257, - 1288 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 33 - } - } - } - ], - "range": [ - 1088, - 1291 - ], - "loc": { - "start": { - "line": 43, - "column": 26 - }, - "end": { - "line": 51, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - ], - "range": [ - 1063, - 1291 - ], - "loc": { - "start": { - "line": 43, - "column": 1 - }, - "end": { - "line": 51, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 2610, - 2616 - ], - "loc": { - "start": { - "line": 126, - "column": 23 - }, - "end": { - "line": 126, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 2731, - 2737 - ], - "loc": { - "start": { - "line": 128, - "column": 23 - }, - "end": { - "line": 128, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 2298, - 2313 - ], - "loc": { - "start": { - "line": 114, - "column": 16 - }, - "end": { - "line": 114, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 177, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 2331, - 2346 - ], - "loc": { - "start": { - "line": 115, - "column": 16 - }, - "end": { - "line": 115, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 638, - 653 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 2368, - 2372 - ], - "loc": { - "start": { - "line": 116, - "column": 20 - }, - "end": { - "line": 116, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2381, - 2389 - ], - "loc": { - "start": { - "line": 117, - "column": 7 - }, - "end": { - "line": 117, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 2397, - 2403 - ], - "loc": { - "start": { - "line": 118, - "column": 7 - }, - "end": { - "line": 118, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2482, - 2490 - ], - "loc": { - "start": { - "line": 122, - "column": 40 - }, - "end": { - "line": 122, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 2494, - 2506 - ], - "loc": { - "start": { - "line": 122, - "column": 52 - }, - "end": { - "line": 122, - "column": 64 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 2539, - 2543 - ], - "loc": { - "start": { - "line": 123, - "column": 21 - }, - "end": { - "line": 123, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2546, - 2554 - ], - "loc": { - "start": { - "line": 123, - "column": 28 - }, - "end": { - "line": 123, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 2610, - 2616 - ], - "loc": { - "start": { - "line": 126, - "column": 23 - }, - "end": { - "line": 126, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 2617, - 2621 - ], - "loc": { - "start": { - "line": 126, - "column": 30 - }, - "end": { - "line": 126, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 2659, - 2665 - ], - "loc": { - "start": { - "line": 127, - "column": 28 - }, - "end": { - "line": 127, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "format", - "range": [ - 2731, - 2737 - ], - "loc": { - "start": { - "line": 128, - "column": 23 - }, - "end": { - "line": 128, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 2738, - 2746 - ], - "loc": { - "start": { - "line": 128, - "column": 30 - }, - "end": { - "line": 128, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 34 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "clearTimeout", - "range": [ - 282, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 282, - 315 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 35 - } - } - }, - "range": [ - 282, - 316 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 36 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 319, - 338 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "showControls", - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 373, - 378 - ], - "loc": { - "start": { - "line": 14, - "column": 56 - }, - "end": { - "line": 14, - "column": 61 - } - } - }, - "range": [ - 358, - 378 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 61 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 352, - 378 - ], - "loc": { - "start": { - "line": 14, - "column": 35 - }, - "end": { - "line": 14, - "column": 61 - } - } - }, - { - "type": "Literal", - "raw": "2500", - "value": 2500, - "range": [ - 380, - 384 - ], - "loc": { - "start": { - "line": 14, - "column": 63 - }, - "end": { - "line": 14, - "column": 67 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 341, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 68 - } - } - }, - "range": [ - 319, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 68 - } - } - }, - "range": [ - 319, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 69 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "showControls", - "range": [ - 389, - 401 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 404, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 389, - 408 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 21 - } - } - }, - "range": [ - 389, - 409 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 22 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 435, - 442 - ], - "loc": { - "start": { - "line": 17, - "column": 24 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "buttons", - "range": [ - 421, - 428 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "range": [ - 419, - 428 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 17 - } - } - }, - "operator": "&", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 431, - 432 - ], - "loc": { - "start": { - "line": 17, - "column": 20 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 419, - 432 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 417, - 433 - ], - "loc": { - "start": { - "line": 17, - "column": 6 - }, - "end": { - "line": 17, - "column": 22 - } - } - }, - "range": [ - 413, - 442 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 31 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 478, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "duration", - "range": [ - 468, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 7 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 467, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 6 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "range": [ - 463, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - ], - "range": [ - 519, - 534 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 537, - 541 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getBoundingClientRect", - "range": [ - 542, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "range": [ - 537, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "optional": false, - "range": [ - 537, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 54 - } - } - }, - "range": [ - 519, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 54 - } - } - } - ], - "range": [ - 513, - 566 - ], - "loc": { - "start": { - "line": 20, - "column": 2 - }, - "end": { - "line": 20, - "column": 55 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "time", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "duration", - "range": [ - 576, - 584 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 17 - } - } - }, - "operator": "*", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 588, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 590, - 597 - ], - "loc": { - "start": { - "line": 21, - "column": 23 - }, - "end": { - "line": 21, - "column": 30 - } - } - }, - "range": [ - 588, - 597 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 30 - } - } - }, - "operator": "-", - "right": { - "type": "Identifier", - "name": "left", - "range": [ - 600, - 604 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "range": [ - 588, - 604 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "range": [ - 576, - 605 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 38 - } - } - }, - "operator": "/", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "right", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 21, - "column": 42 - }, - "end": { - "line": 21, - "column": 47 - } - } - }, - "operator": "-", - "right": { - "type": "Identifier", - "name": "left", - "range": [ - 617, - 621 - ], - "loc": { - "start": { - "line": 21, - "column": 50 - }, - "end": { - "line": 21, - "column": 54 - } - } - }, - "range": [ - 609, - 621 - ], - "loc": { - "start": { - "line": 21, - "column": 42 - }, - "end": { - "line": 21, - "column": 54 - } - } - }, - "range": [ - 576, - 622 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 55 - } - } - }, - "range": [ - 569, - 622 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 55 - } - } - }, - "range": [ - 569, - 623 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 56 - } - } - } - ], - "range": [ - 196, - 626 - ], - "loc": { - "start": { - "line": 10, - "column": 29 - }, - "end": { - "line": 22, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousemove", - "range": [ - 177, - 192 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - ], - "range": [ - 168, - 626 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 22, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 588, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - } - ] - }, - { - "name": "left", - "identifiers": [ - { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - ], - "range": [ - 519, - 534 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 537, - 541 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getBoundingClientRect", - "range": [ - 542, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "range": [ - 537, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "optional": false, - "range": [ - 537, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 54 - } - } - }, - "range": [ - 519, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "left", - "range": [ - 600, - 604 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "left", - "range": [ - 617, - 621 - ], - "loc": { - "start": { - "line": 21, - "column": 50 - }, - "end": { - "line": 21, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - } - ] - }, - { - "name": "right", - "identifiers": [ - { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - ], - "range": [ - 519, - 534 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 23 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 537, - 541 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 30 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getBoundingClientRect", - "range": [ - 542, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "range": [ - 537, - 563 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 52 - } - } - }, - "optional": false, - "range": [ - 537, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 26 - }, - "end": { - "line": 20, - "column": 54 - } - } - }, - "range": [ - 519, - 565 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "right", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 21, - "column": 42 - }, - "end": { - "line": 21, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "clearTimeout", - "range": [ - 282, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 319, - 338 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 389, - 401 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 419, - 420 - ], - "loc": { - "start": { - "line": 17, - "column": 8 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 468, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 7 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 576, - 584 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 588, - 589 - ], - "loc": { - "start": { - "line": 21, - "column": 21 - }, - "end": { - "line": 21, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 193, - 194 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "left", - "range": [ - 600, - 604 - ], - "loc": { - "start": { - "line": 21, - "column": 33 - }, - "end": { - "line": 21, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "right", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 21, - "column": 42 - }, - "end": { - "line": 21, - "column": 47 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "right", - "range": [ - 527, - 532 - ], - "loc": { - "start": { - "line": 20, - "column": 16 - }, - "end": { - "line": 20, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "left", - "range": [ - 617, - 621 - ], - "loc": { - "start": { - "line": 21, - "column": 50 - }, - "end": { - "line": 21, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "left", - "range": [ - 521, - 525 - ], - "loc": { - "start": { - "line": 20, - "column": 10 - }, - "end": { - "line": 20, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clearTimeout", - "range": [ - 282, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 295, - 314 - ], - "loc": { - "start": { - "line": 13, - "column": 15 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 319, - 338 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 21 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControlsTimeout", - "range": [ - 145, - 164 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 14, - "column": 41 - }, - "end": { - "line": 14, - "column": 53 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "showControls", - "range": [ - 389, - 401 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "showControls", - "range": [ - 119, - 131 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 468, - 476 - ], - "loc": { - "start": { - "line": 18, - "column": 7 - }, - "end": { - "line": 18, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "time", - "range": [ - 569, - 573 - ], - "loc": { - "start": { - "line": 21, - "column": 2 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "duration", - "range": [ - 576, - 584 - ], - "loc": { - "start": { - "line": 21, - "column": 9 - }, - "end": { - "line": 21, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "duration", - "range": [ - 83, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 853, - 854 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 855, - 861 - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - "range": [ - 853, - 861 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 862, - 867 - ], - "loc": { - "start": { - "line": 30, - "column": 17 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - "range": [ - 853, - 867 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 853, - 869 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 24 - } - } - }, - "range": [ - 853, - 870 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 828, - 829 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 830, - 836 - ], - "loc": { - "start": { - "line": 29, - "column": 17 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "range": [ - 828, - 836 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "play", - "range": [ - 837, - 841 - ], - "loc": { - "start": { - "line": 29, - "column": 24 - }, - "end": { - "line": 29, - "column": 28 - } - } - }, - "range": [ - 828, - 841 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 828, - 843 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 30 - } - } - }, - "range": [ - 828, - 844 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 31 - } - } - }, - "test": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "range": [ - 816, - 870 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "cancel", - "range": [ - 874, - 880 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "optional": false, - "range": [ - 874, - 882 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "range": [ - 874, - 883 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 12 - } - } - } - ], - "range": [ - 811, - 887 - ], - "loc": { - "start": { - "line": 28, - "column": 27 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - }, - "params": [], - "range": [ - 786, - 887 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'mouseup'", - "value": "mouseup", - "range": [ - 943, - 952 - ], - "loc": { - "start": { - "line": 35, - "column": 32 - }, - "end": { - "line": 35, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 954, - 967 - ], - "loc": { - "start": { - "line": 35, - "column": 43 - }, - "end": { - "line": 35, - "column": 56 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 914, - 915 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 916, - 922 - ], - "loc": { - "start": { - "line": 35, - "column": 5 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "range": [ - 914, - 922 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "removeEventListener", - "range": [ - 923, - 942 - ], - "loc": { - "start": { - "line": 35, - "column": 12 - }, - "end": { - "line": 35, - "column": 31 - } - } - }, - "range": [ - 914, - 942 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 914, - 968 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 57 - } - } - }, - "range": [ - 914, - 969 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 58 - } - } - } - ], - "range": [ - 909, - 973 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 36, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - }, - "params": [], - "range": [ - 891, - 973 - ], - "loc": { - "start": { - "line": 34, - "column": 2 - }, - "end": { - "line": 36, - "column": 3 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'mouseup'", - "value": "mouseup", - "range": [ - 1003, - 1012 - ], - "loc": { - "start": { - "line": 38, - "column": 28 - }, - "end": { - "line": 38, - "column": 37 - } - } - }, - { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 1014, - 1027 - ], - "loc": { - "start": { - "line": 38, - "column": 39 - }, - "end": { - "line": 38, - "column": 52 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 977, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 3 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 979, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 4 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "range": [ - 977, - 985 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "addEventListener", - "range": [ - 986, - 1002 - ], - "loc": { - "start": { - "line": 38, - "column": 11 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "range": [ - 977, - 1002 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 27 - } - } - }, - "optional": false, - "range": [ - 977, - 1028 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 53 - } - } - }, - "range": [ - 977, - 1029 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 54 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "cancel", - "range": [ - 1044, - 1050 - ], - "loc": { - "start": { - "line": 40, - "column": 13 - }, - "end": { - "line": 40, - "column": 19 - } - } - }, - { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 1052, - 1055 - ], - "loc": { - "start": { - "line": 40, - "column": 21 - }, - "end": { - "line": 40, - "column": 24 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 1033, - 1043 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 1033, - 1056 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 25 - } - } - }, - "range": [ - 1033, - 1057 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 26 - } - } - } - ], - "range": [ - 657, - 1060 - ], - "loc": { - "start": { - "line": 24, - "column": 29 - }, - "end": { - "line": 41, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMousedown", - "range": [ - 638, - 653 - ], - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 25 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - ], - "range": [ - 629, - 1060 - ], - "loc": { - "start": { - "line": 24, - "column": 1 - }, - "end": { - "line": 41, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 828, - 829 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 853, - 854 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 914, - 915 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 977, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - } - ] - }, - { - "name": "handleMouseup", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 853, - 854 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 855, - 861 - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - "range": [ - 853, - 861 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 862, - 867 - ], - "loc": { - "start": { - "line": 30, - "column": 17 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - "range": [ - 853, - 867 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 853, - 869 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 24 - } - } - }, - "range": [ - 853, - 870 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 828, - 829 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 830, - 836 - ], - "loc": { - "start": { - "line": 29, - "column": 17 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "range": [ - 828, - 836 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "play", - "range": [ - 837, - 841 - ], - "loc": { - "start": { - "line": 29, - "column": 24 - }, - "end": { - "line": 29, - "column": 28 - } - } - }, - "range": [ - 828, - 841 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 828, - 843 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 30 - } - } - }, - "range": [ - 828, - 844 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 31 - } - } - }, - "test": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "range": [ - 816, - 870 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 30, - "column": 25 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "cancel", - "range": [ - 874, - 880 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "optional": false, - "range": [ - 874, - 882 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "range": [ - 874, - 883 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 12 - } - } - } - ], - "range": [ - 811, - 887 - ], - "loc": { - "start": { - "line": 28, - "column": 27 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - }, - "params": [], - "range": [ - 786, - 887 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 32, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 954, - 967 - ], - "loc": { - "start": { - "line": 35, - "column": 43 - }, - "end": { - "line": 35, - "column": 56 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 1014, - 1027 - ], - "loc": { - "start": { - "line": 38, - "column": 39 - }, - "end": { - "line": 38, - "column": 52 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - } - } - ] - }, - { - "name": "cancel", - "identifiers": [ - { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'mouseup'", - "value": "mouseup", - "range": [ - 943, - 952 - ], - "loc": { - "start": { - "line": 35, - "column": 32 - }, - "end": { - "line": 35, - "column": 41 - } - } - }, - { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 954, - 967 - ], - "loc": { - "start": { - "line": 35, - "column": 43 - }, - "end": { - "line": 35, - "column": 56 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 914, - 915 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 916, - 922 - ], - "loc": { - "start": { - "line": 35, - "column": 5 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "range": [ - 914, - 922 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "removeEventListener", - "range": [ - 923, - 942 - ], - "loc": { - "start": { - "line": 35, - "column": 12 - }, - "end": { - "line": 35, - "column": 31 - } - } - }, - "range": [ - 914, - 942 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 914, - 968 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 57 - } - } - }, - "range": [ - 914, - 969 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 58 - } - } - } - ], - "range": [ - 909, - 973 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 36, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - }, - "params": [], - "range": [ - 891, - 973 - ], - "loc": { - "start": { - "line": 34, - "column": 2 - }, - "end": { - "line": 36, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cancel", - "range": [ - 874, - 880 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cancel", - "range": [ - 1044, - 1050 - ], - "loc": { - "start": { - "line": 40, - "column": 13 - }, - "end": { - "line": 40, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 977, - 978 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 3 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 1014, - 1027 - ], - "loc": { - "start": { - "line": 38, - "column": 39 - }, - "end": { - "line": 38, - "column": 52 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 1033, - 1043 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "cancel", - "range": [ - 1044, - 1050 - ], - "loc": { - "start": { - "line": 40, - "column": 13 - }, - "end": { - "line": 40, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 828, - 829 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 853, - 854 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cancel", - "range": [ - 874, - 880 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 828, - 829 - ], - "loc": { - "start": { - "line": 29, - "column": 15 - }, - "end": { - "line": 29, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 853, - 854 - ], - "loc": { - "start": { - "line": 30, - "column": 8 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cancel", - "range": [ - 874, - 880 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cancel", - "range": [ - 900, - 906 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 17 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 914, - 915 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 954, - 967 - ], - "loc": { - "start": { - "line": 35, - "column": 43 - }, - "end": { - "line": 35, - "column": 56 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 914, - 915 - ], - "loc": { - "start": { - "line": 35, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 654, - 655 - ], - "loc": { - "start": { - "line": 24, - "column": 26 - }, - "end": { - "line": 24, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 954, - 967 - ], - "loc": { - "start": { - "line": 35, - "column": 43 - }, - "end": { - "line": 35, - "column": 56 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseup", - "range": [ - 795, - 808 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 24 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 820, - 826 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 98, - 104 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 1033, - 1043 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "seconds", - "identifiers": [ - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "Literal", - "raw": "'...'", - "value": "...", - "range": [ - 1119, - 1124 - ], - "loc": { - "start": { - "line": 44, - "column": 29 - }, - "end": { - "line": 44, - "column": 34 - } - } - }, - "range": [ - 1112, - 1125 - ], - "loc": { - "start": { - "line": 44, - "column": 22 - }, - "end": { - "line": 44, - "column": 35 - } - } - }, - "test": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1102, - 1109 - ], - "loc": { - "start": { - "line": 44, - "column": 12 - }, - "end": { - "line": 44, - "column": 19 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "isNaN", - "range": [ - 1096, - 1101 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 11 - } - } - }, - "optional": false, - "range": [ - 1096, - 1110 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 20 - } - } - }, - "range": [ - 1092, - 1125 - ], - "loc": { - "start": { - "line": 44, - "column": 2 - }, - "end": { - "line": 44, - "column": 35 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 36 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "60", - "value": 60, - "range": [ - 1166, - 1168 - ], - "loc": { - "start": { - "line": 46, - "column": 39 - }, - "end": { - "line": 46, - "column": 41 - } - } - }, - "range": [ - 1156, - 1168 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 41 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "floor", - "range": [ - 1150, - 1155 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 28 - } - } - }, - "range": [ - 1145, - 1155 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 1145, - 1169 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 42 - } - } - }, - "range": [ - 1135, - 1169 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 42 - } - } - } - ], - "range": [ - 1129, - 1170 - ], - "loc": { - "start": { - "line": 46, - "column": 2 - }, - "end": { - "line": 46, - "column": 43 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1173, - 1180 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1194, - 1201 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 30 - } - } - }, - "operator": "%", - "right": { - "type": "Literal", - "raw": "60", - "value": 60, - "range": [ - 1204, - 1206 - ], - "loc": { - "start": { - "line": 47, - "column": 33 - }, - "end": { - "line": 47, - "column": 35 - } - } - }, - "range": [ - 1194, - 1206 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 35 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 1183, - 1187 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "floor", - "range": [ - 1188, - 1193 - ], - "loc": { - "start": { - "line": 47, - "column": 17 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "range": [ - 1183, - 1193 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 1183, - 1207 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 36 - } - } - }, - "range": [ - 1173, - 1207 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 36 - } - } - }, - "range": [ - 1173, - 1208 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 37 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1229, - 1236 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 27 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "'0'", - "value": "0", - "range": [ - 1239, - 1242 - ], - "loc": { - "start": { - "line": 48, - "column": 30 - }, - "end": { - "line": 48, - "column": 33 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1245, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 36 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "range": [ - 1239, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 30 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "range": [ - 1229, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "range": [ - 1229, - 1253 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 44 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1215, - 1222 - ], - "loc": { - "start": { - "line": 48, - "column": 6 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "operator": "<", - "right": { - "type": "Literal", - "raw": "10", - "value": 10, - "range": [ - 1225, - 1227 - ], - "loc": { - "start": { - "line": 48, - "column": 16 - }, - "end": { - "line": 48, - "column": 18 - } - } - }, - "range": [ - 1215, - 1227 - ], - "loc": { - "start": { - "line": 48, - "column": 6 - }, - "end": { - "line": 48, - "column": 18 - } - } - }, - "range": [ - 1211, - 1253 - ], - "loc": { - "start": { - "line": 48, - "column": 2 - }, - "end": { - "line": 48, - "column": 44 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "Identifier", - "name": "minutes", - "range": [ - 1267, - 1274 - ], - "loc": { - "start": { - "line": 50, - "column": 12 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1278, - 1285 - ], - "loc": { - "start": { - "line": 50, - "column": 23 - }, - "end": { - "line": 50, - "column": 30 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 1264, - 1267 - ], - "loc": { - "start": { - "line": 50, - "column": 9 - }, - "end": { - "line": 50, - "column": 12 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ":", - "raw": ":" - }, - "range": [ - 1274, - 1278 - ], - "loc": { - "start": { - "line": 50, - "column": 19 - }, - "end": { - "line": 50, - "column": 23 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 1285, - 1287 - ], - "loc": { - "start": { - "line": 50, - "column": 30 - }, - "end": { - "line": 50, - "column": 32 - } - } - } - ], - "range": [ - 1264, - 1287 - ], - "loc": { - "start": { - "line": 50, - "column": 9 - }, - "end": { - "line": 50, - "column": 32 - } - } - }, - "range": [ - 1257, - 1288 - ], - "loc": { - "start": { - "line": 50, - "column": 2 - }, - "end": { - "line": 50, - "column": 33 - } - } - } - ], - "range": [ - 1088, - 1291 - ], - "loc": { - "start": { - "line": 43, - "column": 26 - }, - "end": { - "line": 51, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "format", - "range": [ - 1072, - 1078 - ], - "loc": { - "start": { - "line": 43, - "column": 10 - }, - "end": { - "line": 43, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - ], - "range": [ - 1063, - 1291 - ], - "loc": { - "start": { - "line": 43, - "column": 1 - }, - "end": { - "line": 51, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1102, - 1109 - ], - "loc": { - "start": { - "line": 44, - "column": 12 - }, - "end": { - "line": 44, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1173, - 1180 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1194, - 1201 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1215, - 1222 - ], - "loc": { - "start": { - "line": 48, - "column": 6 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1229, - 1236 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 27 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1245, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 36 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1278, - 1285 - ], - "loc": { - "start": { - "line": 50, - "column": 23 - }, - "end": { - "line": 50, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - } - ] - }, - { - "name": "minutes", - "identifiers": [ - { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 36 - } - } - }, - "operator": "/", - "right": { - "type": "Literal", - "raw": "60", - "value": 60, - "range": [ - 1166, - 1168 - ], - "loc": { - "start": { - "line": 46, - "column": 39 - }, - "end": { - "line": 46, - "column": 41 - } - } - }, - "range": [ - 1156, - 1168 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 41 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "floor", - "range": [ - 1150, - 1155 - ], - "loc": { - "start": { - "line": 46, - "column": 23 - }, - "end": { - "line": 46, - "column": 28 - } - } - }, - "range": [ - 1145, - 1155 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 28 - } - } - }, - "optional": false, - "range": [ - 1145, - 1169 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 42 - } - } - }, - "range": [ - 1135, - 1169 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 42 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1267, - 1274 - ], - "loc": { - "start": { - "line": 50, - "column": 12 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "isNaN", - "range": [ - 1096, - 1101 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1102, - 1109 - ], - "loc": { - "start": { - "line": 44, - "column": 12 - }, - "end": { - "line": 44, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1156, - 1163 - ], - "loc": { - "start": { - "line": 46, - "column": 29 - }, - "end": { - "line": 46, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1173, - 1180 - ], - "loc": { - "start": { - "line": 47, - "column": 2 - }, - "end": { - "line": 47, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1183, - 1187 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1194, - 1201 - ], - "loc": { - "start": { - "line": 47, - "column": 23 - }, - "end": { - "line": 47, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1215, - 1222 - ], - "loc": { - "start": { - "line": 48, - "column": 6 - }, - "end": { - "line": 48, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1229, - 1236 - ], - "loc": { - "start": { - "line": 48, - "column": 20 - }, - "end": { - "line": 48, - "column": 27 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1245, - 1252 - ], - "loc": { - "start": { - "line": 48, - "column": 36 - }, - "end": { - "line": 48, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1267, - 1274 - ], - "loc": { - "start": { - "line": 50, - "column": 12 - }, - "end": { - "line": 50, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "minutes", - "range": [ - 1135, - 1142 - ], - "loc": { - "start": { - "line": 46, - "column": 8 - }, - "end": { - "line": 46, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1278, - 1285 - ], - "loc": { - "start": { - "line": 50, - "column": 23 - }, - "end": { - "line": 50, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 1079, - 1086 - ], - "loc": { - "start": { - "line": 43, - "column": 17 - }, - "end": { - "line": 43, - "column": 24 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "isNaN", - "range": [ - 1096, - 1101 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1183, - 1187 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clearTimeout", - "range": [ - 282, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 1033, - 1043 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "isNaN", - "range": [ - 1096, - 1101 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1183, - 1187 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clearTimeout", - "range": [ - 282, - 294 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 341, - 351 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 1033, - 1043 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "isNaN", - "range": [ - 1096, - 1101 - ], - "loc": { - "start": { - "line": 44, - "column": 6 - }, - "end": { - "line": 44, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1145, - 1149 - ], - "loc": { - "start": { - "line": 46, - "column": 18 - }, - "end": { - "line": 46, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 1183, - 1187 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json index 5a27f922..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,682 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "AudioPlayer", - "identifiers": [ - { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 202, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 426, - 437 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 657, - 668 - ], - "loc": { - "start": { - "line": 26, - "column": 1 - }, - "end": { - "line": 26, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 889, - 900 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 34, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 1157, - 1168 - ], - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 42, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "stopAll", - "identifiers": [ - { - "type": "Identifier", - "name": "stopAll", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "local": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 100, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 100, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 202, - 213 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 426, - 437 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 657, - 668 - ], - "loc": { - "start": { - "line": 26, - "column": 1 - }, - "end": { - "line": 26, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 889, - 900 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 34, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 1157, - 1168 - ], - "loc": { - "start": { - "line": 42, - "column": 1 - }, - "end": { - "line": 42, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json index 3a433098..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4383 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "elements", - "identifiers": [ - { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "Set", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "range": [ - 44, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 33, - 53 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 87, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 336, - 344 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 372, - 380 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 429, - 437 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "stopAll", - "identifiers": [ - { - "type": "Identifier", - "name": "stopAll", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "element", - "range": [ - 120, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "range": [ - 120, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 120, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 120, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 19 - } - } - } - ], - "range": [ - 115, - 140 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 7, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "element", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 104, - 140 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 7, - "column": 3 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "elements", - "range": [ - 87, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "forEach", - "range": [ - 96, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "range": [ - 87, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "optional": false, - "range": [ - 87, - 141 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 7, - "column": 4 - } - } - }, - "range": [ - 87, - 142 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 7, - "column": 5 - } - } - } - ], - "range": [ - 83, - 145 - ], - "loc": { - "start": { - "line": 4, - "column": 27 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "stopAll", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "params": [], - "range": [ - 64, - 145 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [] - }, - { - "name": "onMount", - "identifiers": [ - { - "type": "Identifier", - "name": "onMount", - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onMount", - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onMount", - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "onMount", - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 318, - 325 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - } - } - ] - }, - { - "name": "src", - "identifiers": [ - { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - }, - "init": null, - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 893, - 896 - ], - "loc": { - "start": { - "line": 50, - "column": 3 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - } - } - ] - }, - { - "name": "title", - "identifiers": [ - { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "init": null, - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 738, - 743 - ], - "loc": { - "start": { - "line": 42, - "column": 6 - }, - "end": { - "line": 42, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - } - ] - }, - { - "name": "composer", - "identifiers": [ - { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "init": null, - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "composer", - "range": [ - 763, - 771 - ], - "loc": { - "start": { - "line": 43, - "column": 13 - }, - "end": { - "line": 43, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - } - } - ] - }, - { - "name": "performer", - "identifiers": [ - { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "init": null, - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "performer", - "range": [ - 798, - 807 - ], - "loc": { - "start": { - "line": 43, - "column": 48 - }, - "end": { - "line": 43, - "column": 57 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - } - ] - }, - { - "name": "audio", - "identifiers": [ - { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "init": null, - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 349, - 354 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 24, - "column": 31 - }, - "end": { - "line": 24, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 478, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 835, - 840 - ], - "loc": { - "start": { - "line": 46, - "column": 13 - }, - "end": { - "line": 46, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ] - }, - { - "name": "paused", - "identifiers": [ - { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 310, - 314 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 18 - } - } - }, - "range": [ - 301, - 314 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 723, - 729 - ], - "loc": { - "start": { - "line": 41, - "column": 25 - }, - "end": { - "line": 41, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 849, - 855 - ], - "loc": { - "start": { - "line": 47, - "column": 7 - }, - "end": { - "line": 47, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - } - ] - }, - { - "name": "stopOthers", - "identifiers": [ - { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 412, - 422 - ], - "loc": { - "start": { - "line": 27, - "column": 10 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 412, - 422 - ], - "loc": { - "start": { - "line": 27, - "column": 10 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "element", - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 493, - 498 - ], - "loc": { - "start": { - "line": 29, - "column": 34 - }, - "end": { - "line": 29, - "column": 39 - } - } - }, - "range": [ - 485, - 498 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 39 - } - } - }, - "optional": false, - "range": [ - 485, - 500 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 41 - } - } - }, - "range": [ - 485, - 501 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 42 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "element", - "range": [ - 466, - 473 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "audio", - "range": [ - 478, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "range": [ - 466, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "range": [ - 462, - 501 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 29, - "column": 42 - } - } - } - ], - "range": [ - 457, - 505 - ], - "loc": { - "start": { - "line": 28, - "column": 30 - }, - "end": { - "line": 30, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - ], - "range": [ - 446, - 505 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 30, - "column": 3 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "elements", - "range": [ - 429, - 437 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "forEach", - "range": [ - 438, - 445 - ], - "loc": { - "start": { - "line": 28, - "column": 11 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - "range": [ - 429, - 445 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - "optional": false, - "range": [ - 429, - 506 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 30, - "column": 4 - } - } - }, - "range": [ - 429, - 507 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 30, - "column": 5 - } - } - } - ], - "range": [ - 425, - 510 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 31, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 412, - 422 - ], - "loc": { - "start": { - "line": 27, - "column": 10 - }, - "end": { - "line": 27, - "column": 20 - } - } - }, - "params": [], - "range": [ - 403, - 510 - ], - "loc": { - "start": { - "line": 27, - "column": 1 - }, - "end": { - "line": 31, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 867, - 877 - ], - "loc": { - "start": { - "line": 48, - "column": 11 - }, - "end": { - "line": 48, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 412, - 422 - ], - "loc": { - "start": { - "line": 27, - "column": 10 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Set", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 318, - 325 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 176, - 183 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 723, - 729 - ], - "loc": { - "start": { - "line": 41, - "column": 25 - }, - "end": { - "line": 41, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 738, - 743 - ], - "loc": { - "start": { - "line": 42, - "column": 6 - }, - "end": { - "line": 42, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 231, - 236 - ], - "loc": { - "start": { - "line": 15, - "column": 12 - }, - "end": { - "line": 15, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "composer", - "range": [ - 763, - 771 - ], - "loc": { - "start": { - "line": 43, - "column": 13 - }, - "end": { - "line": 43, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "composer", - "range": [ - 250, - 258 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "performer", - "range": [ - 798, - 807 - ], - "loc": { - "start": { - "line": 43, - "column": 48 - }, - "end": { - "line": 43, - "column": 57 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "performer", - "range": [ - 272, - 281 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 835, - 840 - ], - "loc": { - "start": { - "line": 46, - "column": 13 - }, - "end": { - "line": 46, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 849, - 855 - ], - "loc": { - "start": { - "line": 47, - "column": 7 - }, - "end": { - "line": 47, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 301, - 307 - ], - "loc": { - "start": { - "line": 20, - "column": 5 - }, - "end": { - "line": 20, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 867, - 877 - ], - "loc": { - "start": { - "line": 48, - "column": 11 - }, - "end": { - "line": 48, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 412, - 422 - ], - "loc": { - "start": { - "line": 27, - "column": 10 - }, - "end": { - "line": 27, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 893, - 896 - ], - "loc": { - "start": { - "line": 50, - "column": 3 - }, - "end": { - "line": 50, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 214, - 217 - ], - "loc": { - "start": { - "line": 14, - "column": 12 - }, - "end": { - "line": 14, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 87, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "element", - "identifiers": [ - { - "type": "Identifier", - "name": "element", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "element", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "element", - "range": [ - 120, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "range": [ - 120, - 133 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "optional": false, - "range": [ - 120, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 120, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 19 - } - } - } - ], - "range": [ - 115, - 140 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 7, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "element", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - ], - "range": [ - 104, - 140 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 7, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "element", - "range": [ - 120, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "element", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "element", - "range": [ - 120, - 127 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "element", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 87, - 95 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 336, - 344 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 349, - 354 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 372, - 380 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 24, - "column": 31 - }, - "end": { - "line": 24, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 372, - 380 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 24, - "column": 31 - }, - "end": { - "line": 24, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 336, - 344 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 23, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 349, - 354 - ], - "loc": { - "start": { - "line": 23, - "column": 15 - }, - "end": { - "line": 23, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 372, - 380 - ], - "loc": { - "start": { - "line": 24, - "column": 15 - }, - "end": { - "line": 24, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 24, - "column": 31 - }, - "end": { - "line": 24, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 429, - 437 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "element", - "identifiers": [ - { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "element", - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 493, - 498 - ], - "loc": { - "start": { - "line": 29, - "column": 34 - }, - "end": { - "line": 29, - "column": 39 - } - } - }, - "range": [ - 485, - 498 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 39 - } - } - }, - "optional": false, - "range": [ - 485, - 500 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 41 - } - } - }, - "range": [ - 485, - 501 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 42 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "element", - "range": [ - 466, - 473 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "audio", - "range": [ - 478, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "range": [ - 466, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "range": [ - 462, - 501 - ], - "loc": { - "start": { - "line": 29, - "column": 3 - }, - "end": { - "line": 29, - "column": 42 - } - } - } - ], - "range": [ - 457, - 505 - ], - "loc": { - "start": { - "line": 28, - "column": 30 - }, - "end": { - "line": 30, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - ], - "range": [ - 446, - 505 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 30, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "element", - "range": [ - 466, - 473 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "element", - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "element", - "range": [ - 466, - 473 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 478, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "element", - "range": [ - 485, - 492 - ], - "loc": { - "start": { - "line": 29, - "column": 26 - }, - "end": { - "line": 29, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "element", - "range": [ - 446, - 453 - ], - "loc": { - "start": { - "line": 28, - "column": 19 - }, - "end": { - "line": 28, - "column": 26 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 478, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "elements", - "range": [ - 429, - 437 - ], - "loc": { - "start": { - "line": 28, - "column": 2 - }, - "end": { - "line": 28, - "column": 10 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "elements", - "range": [ - 33, - 41 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 478, - 483 - ], - "loc": { - "start": { - "line": 29, - "column": 19 - }, - "end": { - "line": 29, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 289, - 294 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Set", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Set", - "range": [ - 48, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json index 1ab1442e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4193 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "scoops", - "identifiers": [ - { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 23, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 14, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 375, - 381 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 454, - 460 - ], - "loc": { - "start": { - "line": 25, - "column": 31 - }, - "end": { - "line": 25, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 534, - 540 - ], - "loc": { - "start": { - "line": 30, - "column": 31 - }, - "end": { - "line": 30, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 832, - 838 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 915, - 921 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 924, - 930 - ], - "loc": { - "start": { - "line": 50, - "column": 24 - }, - "end": { - "line": 50, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - }, - { - "name": "flavours", - "identifiers": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'Mint choc chip'", - "value": "Mint choc chip", - "range": [ - 43, - 59 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 33 - } - } - } - ], - "range": [ - 42, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 34 - } - } - }, - "range": [ - 31, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 34 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 625, - 633 - ], - "loc": { - "start": { - "line": 36, - "column": 29 - }, - "end": { - "line": 36, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 738, - 746 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 814, - 822 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 970, - 978 - ], - "loc": { - "start": { - "line": 51, - "column": 11 - }, - "end": { - "line": 51, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - }, - { - "name": "menu", - "identifiers": [ - { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'Cookies and cream'", - "value": "Cookies and cream", - "range": [ - 79, - 98 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 21 - } - } - }, - { - "type": "Literal", - "raw": "'Mint choc chip'", - "value": "Mint choc chip", - "range": [ - 102, - 118 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - { - "type": "Literal", - "raw": "'Raspberry ripple'", - "value": "Raspberry ripple", - "range": [ - 122, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - ], - "range": [ - 75, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "range": [ - 68, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 644, - 648 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - } - ] - }, - { - "name": "join", - "identifiers": [ - { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 209, - 217 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 45 - }, - "end": { - "line": 12, - "column": 46 - } - } - }, - "range": [ - 209, - 220 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 47 - } - } - }, - "range": [ - 202, - 221 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 48 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 188, - 194 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, - "range": [ - 179, - 194 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 199, - 200 - ], - "loc": { - "start": { - "line": 12, - "column": 26 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "range": [ - 179, - 200 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "range": [ - 175, - 221 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 48 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "', '", - "value": ", ", - "range": [ - 261, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 39 - }, - "end": { - "line": 13, - "column": 43 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 249, - 250 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 28 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 252, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 30 - }, - "end": { - "line": 13, - "column": 32 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 234, - 242 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 243, - 248 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "range": [ - 234, - 248 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 234, - 255 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "join", - "range": [ - 256, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 34 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 234, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "optional": false, - "range": [ - 234, - 266 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 44 - } - } - }, - { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 274, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 52 - }, - "end": { - "line": 13, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 283, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 69 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 292, - 298 - ], - "loc": { - "start": { - "line": 13, - "column": 70 - }, - "end": { - "line": 13, - "column": 76 - } - } - }, - "range": [ - 283, - 298 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 76 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 301, - 302 - ], - "loc": { - "start": { - "line": 13, - "column": 79 - }, - "end": { - "line": 13, - "column": 80 - } - } - }, - "range": [ - 283, - 302 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 80 - } - } - }, - "range": [ - 274, - 303 - ], - "loc": { - "start": { - "line": 13, - "column": 52 - }, - "end": { - "line": 13, - "column": 81 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 231, - 234 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " and ", - "raw": " and " - }, - "range": [ - 266, - 274 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 52 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 303, - 305 - ], - "loc": { - "start": { - "line": 13, - "column": 81 - }, - "end": { - "line": 13, - "column": 83 - } - } - } - ], - "range": [ - 231, - 305 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 83 - } - } - }, - "range": [ - 224, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 84 - } - } - } - ], - "range": [ - 171, - 309 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - ], - "range": [ - 147, - 309 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "join", - "range": [ - 965, - 969 - ], - "loc": { - "start": { - "line": 51, - "column": 6 - }, - "end": { - "line": 51, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 375, - 381 - ], - "loc": { - "start": { - "line": 20, - "column": 31 - }, - "end": { - "line": 20, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 454, - 460 - ], - "loc": { - "start": { - "line": 25, - "column": 31 - }, - "end": { - "line": 25, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 534, - 540 - ], - "loc": { - "start": { - "line": 30, - "column": 31 - }, - "end": { - "line": 30, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 625, - 633 - ], - "loc": { - "start": { - "line": 36, - "column": 29 - }, - "end": { - "line": 36, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "menu", - "range": [ - 644, - 648 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "menu", - "range": [ - 68, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 738, - 746 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 814, - 822 - ], - "loc": { - "start": { - "line": 46, - "column": 10 - }, - "end": { - "line": 46, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 832, - 838 - ], - "loc": { - "start": { - "line": 46, - "column": 28 - }, - "end": { - "line": 46, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "flavours", - "identifiers": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 209, - 217 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 218, - 219 - ], - "loc": { - "start": { - "line": 12, - "column": 45 - }, - "end": { - "line": 12, - "column": 46 - } - } - }, - "range": [ - 209, - 220 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 47 - } - } - }, - "range": [ - 202, - 221 - ], - "loc": { - "start": { - "line": 12, - "column": 29 - }, - "end": { - "line": 12, - "column": 48 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 188, - 194 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, - "range": [ - 179, - 194 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 21 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 199, - 200 - ], - "loc": { - "start": { - "line": 12, - "column": 26 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "range": [ - 179, - 200 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 27 - } - } - }, - "range": [ - 175, - 221 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 48 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "', '", - "value": ", ", - "range": [ - 261, - 265 - ], - "loc": { - "start": { - "line": 13, - "column": 39 - }, - "end": { - "line": 13, - "column": 43 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 249, - 250 - ], - "loc": { - "start": { - "line": 13, - "column": 27 - }, - "end": { - "line": 13, - "column": 28 - } - } - }, - { - "type": "UnaryExpression", - "argument": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 253, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 252, - 254 - ], - "loc": { - "start": { - "line": 13, - "column": 30 - }, - "end": { - "line": 13, - "column": 32 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 234, - 242 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 20 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 243, - 248 - ], - "loc": { - "start": { - "line": 13, - "column": 21 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "range": [ - 234, - 248 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 234, - 255 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 33 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "join", - "range": [ - 256, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 34 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "range": [ - 234, - 260 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 38 - } - } - }, - "optional": false, - "range": [ - 234, - 266 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 44 - } - } - }, - { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 274, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 52 - }, - "end": { - "line": 13, - "column": 60 - } - } - }, - "optional": false, - "property": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "flavours", - "range": [ - 283, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 69 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 292, - 298 - ], - "loc": { - "start": { - "line": 13, - "column": 70 - }, - "end": { - "line": 13, - "column": 76 - } - } - }, - "range": [ - 283, - 298 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 76 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 301, - 302 - ], - "loc": { - "start": { - "line": 13, - "column": 79 - }, - "end": { - "line": 13, - "column": 80 - } - } - }, - "range": [ - 283, - 302 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 80 - } - } - }, - "range": [ - 274, - 303 - ], - "loc": { - "start": { - "line": 13, - "column": 52 - }, - "end": { - "line": 13, - "column": 81 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 231, - 234 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 12 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " and ", - "raw": " and " - }, - "range": [ - 266, - 274 - ], - "loc": { - "start": { - "line": 13, - "column": 44 - }, - "end": { - "line": 13, - "column": 52 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "", - "raw": "" - }, - "range": [ - 303, - 305 - ], - "loc": { - "start": { - "line": 13, - "column": 81 - }, - "end": { - "line": 13, - "column": 83 - } - } - } - ], - "range": [ - 231, - 305 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 83 - } - } - }, - "range": [ - 224, - 306 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 84 - } - } - } - ], - "range": [ - 171, - 309 - ], - "loc": { - "start": { - "line": 11, - "column": 25 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - ], - "range": [ - 147, - 309 - ], - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 209, - 217 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 234, - 242 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 274, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 52 - }, - "end": { - "line": 13, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 283, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 69 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 179, - 187 - ], - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 209, - 217 - ], - "loc": { - "start": { - "line": 12, - "column": 36 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 234, - 242 - ], - "loc": { - "start": { - "line": 13, - "column": 12 - }, - "end": { - "line": 13, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 274, - 282 - ], - "loc": { - "start": { - "line": 13, - "column": 52 - }, - "end": { - "line": 13, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 283, - 291 - ], - "loc": { - "start": { - "line": 13, - "column": 61 - }, - "end": { - "line": 13, - "column": 69 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 161, - 169 - ], - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "function", - "variables": [ - { - "name": "flavour", - "identifiers": [ - { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "menu", - "range": [ - 644, - 648 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "option", - "range": [ - 664, - 670 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "value", - "range": [ - 671, - 676 - ], - "loc": { - "start": { - "line": 38, - "column": 10 - }, - "end": { - "line": 38, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "flavour", - "range": [ - 678, - 685 - ], - "loc": { - "start": { - "line": 38, - "column": 17 - }, - "end": { - "line": 38, - "column": 24 - } - } - }, - "range": [ - 677, - 686 - ], - "loc": { - "start": { - "line": 38, - "column": 16 - }, - "end": { - "line": 38, - "column": 25 - } - } - } - ], - "range": [ - 671, - 686 - ], - "loc": { - "start": { - "line": 38, - "column": 10 - }, - "end": { - "line": 38, - "column": 25 - } - } - } - ], - "selfClosing": false, - "range": [ - 663, - 687 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 38, - "column": 26 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 687, - 691 - ], - "loc": { - "start": { - "line": 38, - "column": 26 - }, - "end": { - "line": 39, - "column": 3 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "flavour", - "range": [ - 692, - 699 - ], - "loc": { - "start": { - "line": 39, - "column": 4 - }, - "end": { - "line": 39, - "column": 11 - } - } - }, - "range": [ - 691, - 700 - ], - "loc": { - "start": { - "line": 39, - "column": 3 - }, - "end": { - "line": 39, - "column": 12 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 700, - 703 - ], - "loc": { - "start": { - "line": 39, - "column": 12 - }, - "end": { - "line": 40, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 703, - 712 - ], - "loc": { - "start": { - "line": 40, - "column": 2 - }, - "end": { - "line": 40, - "column": 11 - } - } - }, - "range": [ - 663, - 712 - ], - "loc": { - "start": { - "line": 38, - "column": 2 - }, - "end": { - "line": 40, - "column": 11 - } - } - } - ], - "else": null, - "range": [ - 637, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 1 - }, - "end": { - "line": 41, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 678, - 685 - ], - "loc": { - "start": { - "line": 38, - "column": 17 - }, - "end": { - "line": 38, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 692, - 699 - ], - "loc": { - "start": { - "line": 39, - "column": 4 - }, - "end": { - "line": 39, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 678, - 685 - ], - "loc": { - "start": { - "line": 38, - "column": 17 - }, - "end": { - "line": 38, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavour", - "range": [ - 692, - 699 - ], - "loc": { - "start": { - "line": 39, - "column": 4 - }, - "end": { - "line": 39, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavour", - "range": [ - 652, - 659 - ], - "loc": { - "start": { - "line": 37, - "column": 16 - }, - "end": { - "line": 37, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 915, - 921 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 924, - 930 - ], - "loc": { - "start": { - "line": 50, - "column": 24 - }, - "end": { - "line": 50, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "join", - "range": [ - 965, - 969 - ], - "loc": { - "start": { - "line": 51, - "column": 6 - }, - "end": { - "line": 51, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 970, - 978 - ], - "loc": { - "start": { - "line": 51, - "column": 11 - }, - "end": { - "line": 51, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 915, - 921 - ], - "loc": { - "start": { - "line": 50, - "column": 15 - }, - "end": { - "line": 50, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "scoops", - "range": [ - 924, - 930 - ], - "loc": { - "start": { - "line": 50, - "column": 24 - }, - "end": { - "line": 50, - "column": 30 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "scoops", - "range": [ - 14, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "join", - "range": [ - 965, - 969 - ], - "loc": { - "start": { - "line": 51, - "column": 6 - }, - "end": { - "line": 51, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "join", - "range": [ - 156, - 160 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "flavours", - "range": [ - 970, - 978 - ], - "loc": { - "start": { - "line": 51, - "column": 11 - }, - "end": { - "line": 51, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flavours", - "range": [ - 31, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json index abb34b09..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "ContactCard", - "identifiers": [ - { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 70, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 70, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "ContactCard", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json index dbe14f8d..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Nested", - "identifiers": [ - { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 88, - 94 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Nested", - "range": [ - 88, - 94 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Nested", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json index 5d8660e6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1022 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 18, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 122, - 123 - ], - "loc": { - "start": { - "line": 8, - "column": 26 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 258, - 259 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 270, - 271 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 12, - "column": 27 - }, - "end": { - "line": 12, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 227, - 228 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 264, - 265 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 274, - 275 - ], - "loc": { - "start": { - "line": 16, - "column": 20 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 79, - 80 - ], - "loc": { - "start": { - "line": 7, - "column": 27 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 122, - 123 - ], - "loc": { - "start": { - "line": 8, - "column": 26 - }, - "end": { - "line": 8, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 184, - 185 - ], - "loc": { - "start": { - "line": 12, - "column": 27 - }, - "end": { - "line": 12, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 227, - 228 - ], - "loc": { - "start": { - "line": 13, - "column": 26 - }, - "end": { - "line": 13, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 258, - 259 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 264, - 265 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 270, - 271 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 274, - 275 - ], - "loc": { - "start": { - "line": 16, - "column": 20 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json index 0dcb13a6..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1022 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "a", - "identifiers": [ - { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 18, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 84, - 85 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 278, - 279 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 290, - 291 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - } - ] - }, - { - "name": "b", - "identifiers": [ - { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "init": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 30, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 199, - 200 - ], - "loc": { - "start": { - "line": 12, - "column": 32 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 247, - 248 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 284, - 285 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 16, - "column": 20 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 84, - 85 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 132, - 133 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 199, - 200 - ], - "loc": { - "start": { - "line": 12, - "column": 32 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 247, - 248 - ], - "loc": { - "start": { - "line": 13, - "column": 31 - }, - "end": { - "line": 13, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 278, - 279 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 16, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 284, - 285 - ], - "loc": { - "start": { - "line": 16, - "column": 10 - }, - "end": { - "line": 16, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "a", - "range": [ - 290, - 291 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "a", - "range": [ - 14, - 15 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "b", - "range": [ - 294, - 295 - ], - "loc": { - "start": { - "line": 16, - "column": 20 - }, - "end": { - "line": 16, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "b", - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 6 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json index 25331dd1..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1260 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onDestroy", - "identifiers": [ - { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "local": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - }, - { - "name": "seconds", - "identifiers": [ - { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 62, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 52, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 36 - }, - "end": { - "line": 5, - "column": 43 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 211, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 221, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "name": "interval", - "identifiers": [ - { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "seconds", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 36 - }, - "end": { - "line": 5, - "column": 43 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 112, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 47 - }, - "end": { - "line": 5, - "column": 48 - } - } - }, - "range": [ - 101, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 36 - }, - "end": { - "line": 5, - "column": 48 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 95, - 113 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 48 - } - } - }, - { - "type": "Literal", - "raw": "1000", - "value": 1000, - "range": [ - 115, - 119 - ], - "loc": { - "start": { - "line": 5, - "column": 50 - }, - "end": { - "line": 5, - "column": 54 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setInterval", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 83, - 120 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 55 - } - } - }, - "range": [ - 72, - 120 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 55 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "interval", - "range": [ - 154, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setInterval", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 124, - 133 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onDestroy", - "range": [ - 19, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 211, - 218 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 12, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 221, - 228 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 36 - }, - "end": { - "line": 5, - "column": 43 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "seconds", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 36 - }, - "end": { - "line": 5, - "column": 43 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "seconds", - "range": [ - 52, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "clearInterval", - "range": [ - 140, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "interval", - "range": [ - 154, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "clearInterval", - "range": [ - 140, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "interval", - "range": [ - 154, - 162 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "interval", - "range": [ - 72, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "setInterval", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "clearInterval", - "range": [ - 140, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "setInterval", - "range": [ - 83, - 94 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "clearInterval", - "range": [ - 140, - 153 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json index 72b0d3e8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2089 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "onMount", - "identifiers": [ - { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 65, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "photos", - "identifiers": [ - { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [], - "range": [ - 59, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "range": [ - 50, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 173, - 179 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 436, - 442 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "onMount", - "range": [ - 65, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "onMount", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 436, - 442 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "res", - "identifiers": [ - { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "init": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "https://jsonplaceholder.typicode.com/photos?_limit=20", - "raw": "https://jsonplaceholder.typicode.com/photos?_limit=20" - }, - "range": [ - 113, - 168 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 81 - } - } - } - ], - "range": [ - 113, - 168 - ], - "loc": { - "start": { - "line": 7, - "column": 26 - }, - "end": { - "line": 7, - "column": 81 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "fetch", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 107, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 82 - } - } - }, - "range": [ - 101, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 14 - }, - "end": { - "line": 7, - "column": 82 - } - } - }, - "range": [ - 95, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 82 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 188, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 173, - 179 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "res", - "range": [ - 188, - 191 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "res", - "range": [ - 95, - 98 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "photos", - "range": [ - 173, - 179 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "photos", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "photo", - "identifiers": [ - { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "photos", - "range": [ - 436, - 442 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 14 - } - } - }, - "context": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "figure", - "range": [ - 456, - 462 - ], - "loc": { - "start": { - "line": 30, - "column": 3 - }, - "end": { - "line": 30, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 455, - 463 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 30, - "column": 10 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 463, - 467 - ], - "loc": { - "start": { - "line": 30, - "column": 10 - }, - "end": { - "line": 31, - "column": 3 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "img", - "range": [ - 468, - 471 - ], - "loc": { - "start": { - "line": 31, - "column": 4 - }, - "end": { - "line": 31, - "column": 7 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "src", - "range": [ - 472, - 475 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 11 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "photo", - "range": [ - 477, - 482 - ], - "loc": { - "start": { - "line": 31, - "column": 13 - }, - "end": { - "line": 31, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "thumbnailUrl", - "range": [ - 483, - 495 - ], - "loc": { - "start": { - "line": 31, - "column": 19 - }, - "end": { - "line": 31, - "column": 31 - } - } - }, - "range": [ - 477, - 495 - ], - "loc": { - "start": { - "line": 31, - "column": 13 - }, - "end": { - "line": 31, - "column": 31 - } - } - }, - "range": [ - 476, - 496 - ], - "loc": { - "start": { - "line": 31, - "column": 12 - }, - "end": { - "line": 31, - "column": 32 - } - } - } - ], - "range": [ - 472, - 496 - ], - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 32 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "alt", - "range": [ - 497, - 500 - ], - "loc": { - "start": { - "line": 31, - "column": 33 - }, - "end": { - "line": 31, - "column": 36 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "photo", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 31, - "column": 38 - }, - "end": { - "line": 31, - "column": 43 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "title", - "range": [ - 508, - 513 - ], - "loc": { - "start": { - "line": 31, - "column": 44 - }, - "end": { - "line": 31, - "column": 49 - } - } - }, - "range": [ - 502, - 513 - ], - "loc": { - "start": { - "line": 31, - "column": 38 - }, - "end": { - "line": 31, - "column": 49 - } - } - }, - "range": [ - 501, - 514 - ], - "loc": { - "start": { - "line": 31, - "column": 37 - }, - "end": { - "line": 31, - "column": 50 - } - } - } - ], - "range": [ - 497, - 514 - ], - "loc": { - "start": { - "line": 31, - "column": 33 - }, - "end": { - "line": 31, - "column": 50 - } - } - } - ], - "selfClosing": false, - "range": [ - 467, - 515 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 51 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 467, - 515 - ], - "loc": { - "start": { - "line": 31, - "column": 3 - }, - "end": { - "line": 31, - "column": 51 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 515, - 519 - ], - "loc": { - "start": { - "line": 31, - "column": 51 - }, - "end": { - "line": 32, - "column": 3 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "figcaption", - "range": [ - 520, - 530 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 14 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 519, - 531 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 15 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "photo", - "range": [ - 532, - 537 - ], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "title", - "range": [ - 538, - 543 - ], - "loc": { - "start": { - "line": 32, - "column": 22 - }, - "end": { - "line": 32, - "column": 27 - } - } - }, - "range": [ - 532, - 543 - ], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 27 - } - } - }, - "range": [ - 531, - 544 - ], - "loc": { - "start": { - "line": 32, - "column": 15 - }, - "end": { - "line": 32, - "column": 28 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 544, - 557 - ], - "loc": { - "start": { - "line": 32, - "column": 28 - }, - "end": { - "line": 32, - "column": 41 - } - } - }, - "range": [ - 519, - 557 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 41 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 557, - 560 - ], - "loc": { - "start": { - "line": 32, - "column": 41 - }, - "end": { - "line": 33, - "column": 2 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 560, - 569 - ], - "loc": { - "start": { - "line": 33, - "column": 2 - }, - "end": { - "line": 33, - "column": 11 - } - } - }, - "range": [ - 455, - 569 - ], - "loc": { - "start": { - "line": 30, - "column": 2 - }, - "end": { - "line": 33, - "column": 11 - } - } - } - ], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [ - { - "type": "SvelteHTMLComment", - "value": " this block renders when photos.length === 0 ", - "range": [ - 581, - 633 - ], - "loc": { - "start": { - "line": 35, - "column": 2 - }, - "end": { - "line": 35, - "column": 54 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 633, - 636 - ], - "loc": { - "start": { - "line": 35, - "column": 54 - }, - "end": { - "line": 36, - "column": 2 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 637, - 638 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 4 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 636, - 639 - ], - "loc": { - "start": { - "line": 36, - "column": 2 - }, - "end": { - "line": 36, - "column": 5 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "loading...", - "range": [ - 639, - 649 - ], - "loc": { - "start": { - "line": 36, - "column": 5 - }, - "end": { - "line": 36, - "column": 15 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 649, - 653 - ], - "loc": { - "start": { - "line": 36, - "column": 15 - }, - "end": { - "line": 36, - "column": 19 - } - } - }, - "range": [ - 636, - 653 - ], - "loc": { - "start": { - "line": 36, - "column": 2 - }, - "end": { - "line": 36, - "column": 19 - } - } - } - ], - "range": [ - 571, - 655 - ], - "loc": { - "start": { - "line": 34, - "column": 1 - }, - "end": { - "line": 37, - "column": 1 - } - } - }, - "range": [ - 429, - 662 - ], - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 37, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "photo", - "range": [ - 477, - 482 - ], - "loc": { - "start": { - "line": 31, - "column": 13 - }, - "end": { - "line": 31, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photo", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 31, - "column": 38 - }, - "end": { - "line": 31, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photo", - "range": [ - 532, - 537 - ], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "photo", - "range": [ - 477, - 482 - ], - "loc": { - "start": { - "line": 31, - "column": 13 - }, - "end": { - "line": 31, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photo", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 31, - "column": 38 - }, - "end": { - "line": 31, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "photo", - "range": [ - 532, - 537 - ], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "photo", - "range": [ - 446, - 451 - ], - "loc": { - "start": { - "line": 29, - "column": 18 - }, - "end": { - "line": 29, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fetch", - "range": [ - 107, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json index c5cf427c..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,495 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Project", - "identifiers": [ - { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Project", - "range": [ - 417, - 424 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Project", - "range": [ - 711, - 718 - ], - "loc": { - "start": { - "line": 51, - "column": 3 - }, - "end": { - "line": 51, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "Comment", - "identifiers": [ - { - "type": "Identifier", - "name": "Comment", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Comment", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Comment", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Comment", - "range": [ - 535, - 542 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Comment", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Date", - "range": [ - 576, - 580 - ], - "loc": { - "start": { - "line": 44, - "column": 46 - }, - "end": { - "line": 44, - "column": 50 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Comment", - "range": [ - 535, - 542 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Comment", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Project", - "range": [ - 417, - 424 - ], - "loc": { - "start": { - "line": 38, - "column": 3 - }, - "end": { - "line": 38, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Project", - "range": [ - 711, - 718 - ], - "loc": { - "start": { - "line": 51, - "column": 3 - }, - "end": { - "line": 51, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Project", - "range": [ - 17, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Date", - "range": [ - 576, - 580 - ], - "loc": { - "start": { - "line": 44, - "column": 46 - }, - "end": { - "line": 44, - "column": 50 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Date", - "range": [ - 576, - 580 - ], - "loc": { - "start": { - "line": 44, - "column": 46 - }, - "end": { - "line": 44, - "column": 50 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json index 409d9361..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,972 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": null, - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 99, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 53 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 711, - 715 - ], - "loc": { - "start": { - "line": 49, - "column": 8 - }, - "end": { - "line": 49, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - }, - { - "name": "postedAt", - "identifiers": [ - { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "init": null, - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 741, - 749 - ], - "loc": { - "start": { - "line": 50, - "column": 19 - }, - "end": { - "line": 50, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 766, - 774 - ], - "loc": { - "start": { - "line": 50, - "column": 44 - }, - "end": { - "line": 50, - "column": 52 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ] - }, - { - "name": "avatar", - "identifiers": [ - { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "operator": "=", - "right": { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "/ /g", - "regex": { - "flags": "g", - "pattern": " " - }, - "value": "/ /g", - "range": [ - 112, - 116 - ], - "loc": { - "start": { - "line": 5, - "column": 62 - }, - "end": { - "line": 5, - "column": 66 - } - } - }, - { - "type": "Literal", - "raw": "'+'", - "value": "+", - "range": [ - 118, - 121 - ], - "loc": { - "start": { - "line": 5, - "column": 68 - }, - "end": { - "line": 5, - "column": 71 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "name", - "range": [ - 99, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 53 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "replace", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 54 - }, - "end": { - "line": 5, - "column": 61 - } - } - }, - "range": [ - 99, - 111 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 61 - } - } - }, - "optional": false, - "range": [ - 99, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 72 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "https://ui-avatars.com/api/?name=", - "raw": "https://ui-avatars.com/api/?name=" - }, - "range": [ - 63, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 49 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "&rounded=true&background=ff3e00&color=fff&bold=true", - "raw": "&rounded=true&background=ff3e00&color=fff&bold=true" - }, - "range": [ - 122, - 175 - ], - "loc": { - "start": { - "line": 5, - "column": 72 - }, - "end": { - "line": 5, - "column": 125 - } - } - } - ], - "range": [ - 63, - 175 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 125 - } - } - }, - "range": [ - 54, - 175 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 125 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "avatar", - "range": [ - 640, - 646 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 99, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 49 - }, - "end": { - "line": 5, - "column": 53 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "avatar", - "range": [ - 640, - 646 - ], - "loc": { - "start": { - "line": 47, - "column": 12 - }, - "end": { - "line": 47, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "avatar", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 711, - 715 - ], - "loc": { - "start": { - "line": 49, - "column": 8 - }, - "end": { - "line": 49, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 741, - 749 - ], - "loc": { - "start": { - "line": 50, - "column": 19 - }, - "end": { - "line": 50, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 766, - 774 - ], - "loc": { - "start": { - "line": 50, - "column": 44 - }, - "end": { - "line": 50, - "column": 52 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "postedAt", - "range": [ - 39, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json index aa683a62..0cbf2b03 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -96,927 +95,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "title", - "identifiers": [ - { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "init": null, - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 791, - 796 - ], - "loc": { - "start": { - "line": 55, - "column": 7 - }, - "end": { - "line": 55, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "tasksCompleted", - "identifiers": [ - { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 57, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 29 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "range": [ - 40, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 30 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 809, - 823 - ], - "loc": { - "start": { - "line": 56, - "column": 6 - }, - "end": { - "line": 56, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - } - ] - }, - { - "name": "totalTasks", - "identifiers": [ - { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 85, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - "range": [ - 72, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 826, - 836 - ], - "loc": { - "start": { - "line": 56, - "column": 23 - }, - "end": { - "line": 56, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 758, - 765 - ], - "loc": { - "start": { - "line": 53, - "column": 31 - }, - "end": { - "line": 53, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 791, - 796 - ], - "loc": { - "start": { - "line": 55, - "column": 7 - }, - "end": { - "line": 55, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 21, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 809, - 823 - ], - "loc": { - "start": { - "line": 56, - "column": 6 - }, - "end": { - "line": 56, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tasksCompleted", - "range": [ - 40, - 54 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 826, - 836 - ], - "loc": { - "start": { - "line": 56, - "column": 23 - }, - "end": { - "line": 56, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "totalTasks", - "range": [ - 72, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 872, - 879 - ], - "loc": { - "start": { - "line": 58, - "column": 6 - }, - "end": { - "line": 58, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 758, - 765 - ], - "loc": { - "start": { - "line": 53, - "column": 31 - }, - "end": { - "line": 53, - "column": 38 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$$slots", - "range": [ - 872, - 879 - ], - "loc": { - "start": { - "line": 58, - "column": 6 - }, - "end": { - "line": 58, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json index 61f318c4..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,755 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 162, - 167 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 170, - 175 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 94, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - "range": [ - 94, - 105 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 19 - } - } - } - ], - "range": [ - 50, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [], - "range": [ - 27, - 108 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 138, - 149 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 138, - 149 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 162, - 167 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 170, - 175 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json index 1bdd20c0..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1174 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 42, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 150, - 155 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 204, - 209 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "doubled", - "identifiers": [ - { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 42, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 25 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 42, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 32, - 51 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 223, - 230 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 91, - 92 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 82, - 92 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 82, - 93 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 13 - } - } - } - ], - "range": [ - 78, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "params": [], - "range": [ - 55, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 126, - 137 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 42, - 47 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 126, - 137 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 150, - 155 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 158, - 163 - ], - "loc": { - "start": { - "line": 11, - "column": 18 - }, - "end": { - "line": 11, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 204, - 209 - ], - "loc": { - "start": { - "line": 13, - "column": 4 - }, - "end": { - "line": 13, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "doubled", - "range": [ - 223, - 230 - ], - "loc": { - "start": { - "line": 13, - "column": 23 - }, - "end": { - "line": 13, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "doubled", - "range": [ - 32, - 39 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json index 8193ed1e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1640 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "init": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 22, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 10, - "column": 31 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 209, - 214 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 332, - 337 - ], - "loc": { - "start": { - "line": 19, - "column": 10 - }, - "end": { - "line": 19, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 340, - 345 - ], - "loc": { - "start": { - "line": 19, - "column": 18 - }, - "end": { - "line": 19, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "name": "handleClick", - "identifiers": [ - { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "operator": "+=", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 63, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 54, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 12 - } - } - }, - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "range": [ - 50, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 24 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - }, - "params": [], - "range": [ - 27, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 308, - 319 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 209, - 214 - ], - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 308, - 319 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleClick", - "range": [ - 36, - 47 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 332, - 337 - ], - "loc": { - "start": { - "line": 19, - "column": 10 - }, - "end": { - "line": 19, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 340, - 345 - ], - "loc": { - "start": { - "line": 19, - "column": 18 - }, - "end": { - "line": 19, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 54, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 10, - "column": 31 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 9, - "column": 30 - }, - "end": { - "line": 9, - "column": 35 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 188, - 193 - ], - "loc": { - "start": { - "line": 10, - "column": 31 - }, - "end": { - "line": 10, - "column": 36 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 226, - 231 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 226, - 231 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 14, - "column": 2 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 14, - 19 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 10 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 226, - 231 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "console", - "range": [ - 119, - 126 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 226, - 231 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json index 47db0d03..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,857 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "time", - "identifiers": [ - { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$time", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "formatter", - "identifiers": [ - { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'en'", - "value": "en", - "range": [ - 90, - 94 - ], - "loc": { - "start": { - "line": 4, - "column": 43 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "hour12", - "range": [ - 100, - 106 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 108, - 112 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 100, - 112 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "hour", - "range": [ - 116, - 120 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'numeric'", - "value": "numeric", - "range": [ - 122, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 116, - 131 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "minute", - "range": [ - 135, - 141 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'2-digit'", - "value": "2-digit", - "range": [ - 143, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - "range": [ - 135, - 152 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "second", - "range": [ - 156, - 162 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'2-digit'", - "value": "2-digit", - "range": [ - 164, - 173 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 19 - } - } - }, - "range": [ - 156, - 173 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 19 - } - } - } - ], - "range": [ - 96, - 176 - ], - "loc": { - "start": { - "line": 4, - "column": 49 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Intl", - "range": [ - 70, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "DateTimeFormat", - "range": [ - 75, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 28 - }, - "end": { - "line": 4, - "column": 42 - } - } - }, - "range": [ - 70, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 42 - } - } - }, - "range": [ - 66, - 177 - ], - "loc": { - "start": { - "line": 4, - "column": 19 - }, - "end": { - "line": 9, - "column": 3 - } - } - }, - "range": [ - 54, - 177 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 9, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 207, - 216 - ], - "loc": { - "start": { - "line": 12, - "column": 17 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Intl", - "range": [ - 70, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "formatter", - "range": [ - 207, - 216 - ], - "loc": { - "start": { - "line": 12, - "column": 17 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "formatter", - "range": [ - 54, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$time", - "range": [ - 224, - 229 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "time", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Intl", - "range": [ - 70, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Intl", - "range": [ - 70, - 74 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json index af03e5cf..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,3031 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "questions", - "identifiers": [ - { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 32, - 34 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 36, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "range": [ - 32, - 37 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 39, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "Where did you go to school?", - "raw": "Where did you go to school?" - }, - "range": [ - 45, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 46 - } - } - } - ], - "range": [ - 45, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 17 - }, - "end": { - "line": 3, - "column": 46 - } - } - }, - "range": [ - 39, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 46 - } - } - } - ], - "range": [ - 30, - 76 - ], - "loc": { - "start": { - "line": 3, - "column": 2 - }, - "end": { - "line": 3, - "column": 48 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 82, - 84 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 86, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "range": [ - 82, - 87 - ], - "loc": { - "start": { - "line": 4, - "column": 4 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "What is your mother's name?", - "raw": "What is your mother's name?" - }, - "range": [ - 95, - 124 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - ], - "range": [ - 95, - 124 - ], - "loc": { - "start": { - "line": 4, - "column": 17 - }, - "end": { - "line": 4, - "column": 46 - } - } - }, - "range": [ - 89, - 124 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 46 - } - } - } - ], - "range": [ - 80, - 126 - ], - "loc": { - "start": { - "line": 4, - "column": 2 - }, - "end": { - "line": 4, - "column": 48 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 132, - 134 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 136, - 137 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "range": [ - 132, - 137 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 139, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "What is another personal fact that an attacker could easily find with Google?", - "raw": "What is another personal fact that an attacker could easily find with Google?" - }, - "range": [ - 145, - 224 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 96 - } - } - } - ], - "range": [ - 145, - 224 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 96 - } - } - }, - "range": [ - 139, - 224 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 96 - } - } - } - ], - "range": [ - 130, - 226 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 98 - } - } - } - ], - "range": [ - 26, - 229 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "range": [ - 14, - 229 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "questions", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 25, - "column": 9 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "selected", - "identifiers": [ - { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "init": null, - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 323, - 331 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 339, - 347 - ], - "loc": { - "start": { - "line": 13, - "column": 45 - }, - "end": { - "line": 13, - "column": 53 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 564, - 572 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 845, - 853 - ], - "loc": { - "start": { - "line": 39, - "column": 22 - }, - "end": { - "line": 39, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 856, - 864 - ], - "loc": { - "start": { - "line": 39, - "column": 33 - }, - "end": { - "line": 39, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ] - }, - { - "name": "answer", - "identifiers": [ - { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 262, - 264 - ], - "loc": { - "start": { - "line": 10, - "column": 14 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "range": [ - 253, - 264 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 363, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 69 - }, - "end": { - "line": 13, - "column": 75 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 592, - 598 - ], - "loc": { - "start": { - "line": 24, - "column": 49 - }, - "end": { - "line": 24, - "column": 55 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 743, - 749 - ], - "loc": { - "start": { - "line": 32, - "column": 20 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 773, - 779 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 34, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - } - ] - }, - { - "name": "handleSubmit", - "identifiers": [ - { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 277, - 289 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 277, - 289 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "TemplateLiteral", - "expressions": [ - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selected", - "range": [ - 323, - 331 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 332, - 334 - ], - "loc": { - "start": { - "line": 13, - "column": 38 - }, - "end": { - "line": 13, - "column": 40 - } - } - }, - "range": [ - 323, - 334 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 40 - } - } - }, - { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selected", - "range": [ - 339, - 347 - ], - "loc": { - "start": { - "line": 13, - "column": 45 - }, - "end": { - "line": 13, - "column": 53 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 348, - 352 - ], - "loc": { - "start": { - "line": 13, - "column": 54 - }, - "end": { - "line": 13, - "column": 58 - } - } - }, - "range": [ - 339, - 352 - ], - "loc": { - "start": { - "line": 13, - "column": 45 - }, - "end": { - "line": 13, - "column": 58 - } - } - }, - { - "type": "Identifier", - "name": "answer", - "range": [ - 363, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 69 - }, - "end": { - "line": 13, - "column": 75 - } - } - } - ], - "quasis": [ - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": "answered question ", - "raw": "answered question " - }, - "range": [ - 302, - 323 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": " (", - "raw": " (" - }, - "range": [ - 334, - 339 - ], - "loc": { - "start": { - "line": 13, - "column": 40 - }, - "end": { - "line": 13, - "column": 45 - } - } - }, - { - "type": "TemplateElement", - "tail": false, - "value": { - "cooked": ") with \"", - "raw": ") with \"" - }, - "range": [ - 352, - 363 - ], - "loc": { - "start": { - "line": 13, - "column": 58 - }, - "end": { - "line": 13, - "column": 69 - } - } - }, - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "\"", - "raw": "\"" - }, - "range": [ - 369, - 372 - ], - "loc": { - "start": { - "line": 13, - "column": 75 - }, - "end": { - "line": 13, - "column": 78 - } - } - } - ], - "range": [ - 302, - 372 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 78 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "alert", - "range": [ - 296, - 301 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "optional": false, - "range": [ - 296, - 373 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 79 - } - } - }, - "range": [ - 296, - 374 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 80 - } - } - } - ], - "range": [ - 292, - 377 - ], - "loc": { - "start": { - "line": 12, - "column": 25 - }, - "end": { - "line": 14, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 277, - 289 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 22 - } - } - }, - "params": [], - "range": [ - 268, - 377 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 14, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 528, - 540 - ], - "loc": { - "start": { - "line": 23, - "column": 32 - }, - "end": { - "line": 23, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 277, - 289 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 528, - 540 - ], - "loc": { - "start": { - "line": 23, - "column": 32 - }, - "end": { - "line": 23, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleSubmit", - "range": [ - 277, - 289 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 564, - 572 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "questions", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 25, - "column": 9 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "questions", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 743, - 749 - ], - "loc": { - "start": { - "line": 32, - "column": 20 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 773, - 779 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 34, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 845, - 853 - ], - "loc": { - "start": { - "line": 39, - "column": 22 - }, - "end": { - "line": 39, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 856, - 864 - ], - "loc": { - "start": { - "line": 39, - "column": 33 - }, - "end": { - "line": 39, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 296, - 301 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 323, - 331 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 339, - 347 - ], - "loc": { - "start": { - "line": 13, - "column": 45 - }, - "end": { - "line": 13, - "column": 53 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 363, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 69 - }, - "end": { - "line": 13, - "column": 75 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 296, - 301 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 323, - 331 - ], - "loc": { - "start": { - "line": 13, - "column": 29 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 339, - 347 - ], - "loc": { - "start": { - "line": 13, - "column": 45 - }, - "end": { - "line": 13, - "column": 53 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 237, - 245 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 363, - 369 - ], - "loc": { - "start": { - "line": 13, - "column": 69 - }, - "end": { - "line": 13, - "column": 75 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 592, - 598 - ], - "loc": { - "start": { - "line": 24, - "column": 49 - }, - "end": { - "line": 24, - "column": 55 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "answer", - "range": [ - 592, - 598 - ], - "loc": { - "start": { - "line": 24, - "column": 49 - }, - "end": { - "line": 24, - "column": 55 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "answer", - "range": [ - 253, - 259 - ], - "loc": { - "start": { - "line": 10, - "column": 5 - }, - "end": { - "line": 10, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "question", - "identifiers": [ - { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "questions", - "range": [ - 616, - 625 - ], - "loc": { - "start": { - "line": 25, - "column": 9 - }, - "end": { - "line": 25, - "column": 18 - } - } - }, - "context": { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "option", - "range": [ - 643, - 649 - ], - "loc": { - "start": { - "line": 26, - "column": 4 - }, - "end": { - "line": 26, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "value", - "range": [ - 650, - 655 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 16 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "question", - "range": [ - 657, - 665 - ], - "loc": { - "start": { - "line": 26, - "column": 18 - }, - "end": { - "line": 26, - "column": 26 - } - } - }, - "range": [ - 656, - 666 - ], - "loc": { - "start": { - "line": 26, - "column": 17 - }, - "end": { - "line": 26, - "column": 27 - } - } - } - ], - "range": [ - 650, - 666 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 27 - } - } - } - ], - "selfClosing": false, - "range": [ - 642, - 667 - ], - "loc": { - "start": { - "line": 26, - "column": 3 - }, - "end": { - "line": 26, - "column": 28 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 667, - 672 - ], - "loc": { - "start": { - "line": 26, - "column": 28 - }, - "end": { - "line": 27, - "column": 4 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "question", - "range": [ - 673, - 681 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 682, - 686 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "range": [ - 673, - 686 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 18 - } - } - }, - "range": [ - 672, - 687 - ], - "loc": { - "start": { - "line": 27, - "column": 4 - }, - "end": { - "line": 27, - "column": 19 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 687, - 691 - ], - "loc": { - "start": { - "line": 27, - "column": 19 - }, - "end": { - "line": 28, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 691, - 700 - ], - "loc": { - "start": { - "line": 28, - "column": 3 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "range": [ - 642, - 700 - ], - "loc": { - "start": { - "line": 26, - "column": 3 - }, - "end": { - "line": 28, - "column": 12 - } - } - } - ], - "else": null, - "range": [ - 609, - 710 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 29, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "question", - "range": [ - 657, - 665 - ], - "loc": { - "start": { - "line": 26, - "column": 18 - }, - "end": { - "line": 26, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "question", - "range": [ - 673, - 681 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "question", - "range": [ - 657, - 665 - ], - "loc": { - "start": { - "line": 26, - "column": 18 - }, - "end": { - "line": 26, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "question", - "range": [ - 673, - 681 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "question", - "range": [ - 629, - 637 - ], - "loc": { - "start": { - "line": 25, - "column": 22 - }, - "end": { - "line": 25, - "column": 30 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 296, - 301 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "alert", - "range": [ - 296, - 301 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json index 2a533e00..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,501 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "AudioPlayer", - "identifiers": [ - { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 134, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 358, - 369 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 589, - 600 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 821, - 832 - ], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 1089, - 1100 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 134, - 145 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 358, - 369 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 14, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 589, - 600 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 22, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 821, - 832 - ], - "loc": { - "start": { - "line": 30, - "column": 1 - }, - "end": { - "line": 30, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 1089, - 1100 - ], - "loc": { - "start": { - "line": 38, - "column": 1 - }, - "end": { - "line": 38, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "AudioPlayer", - "range": [ - 17, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json index 8c8e2c3c..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2617 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "current", - "identifiers": [ - { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "init": null, - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 206, - 213 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 236, - 243 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 255, - 262 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "src", - "identifiers": [ - { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "init": null, - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 657, - 660 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ] - }, - { - "name": "title", - "identifiers": [ - { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "init": null, - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 28, - "column": 6 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - } - ] - }, - { - "name": "composer", - "identifiers": [ - { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "init": null, - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "composer", - "range": [ - 527, - 535 - ], - "loc": { - "start": { - "line": 29, - "column": 13 - }, - "end": { - "line": 29, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - } - ] - }, - { - "name": "performer", - "identifiers": [ - { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "init": null, - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "performer", - "range": [ - 562, - 571 - ], - "loc": { - "start": { - "line": 29, - "column": 48 - }, - "end": { - "line": 29, - "column": 57 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - } - ] - }, - { - "name": "audio", - "identifiers": [ - { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - }, - "init": null, - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 15, - "column": 29 - }, - "end": { - "line": 15, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 599, - 604 - ], - "loc": { - "start": { - "line": 32, - "column": 13 - }, - "end": { - "line": 32, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - } - ] - }, - { - "name": "paused", - "identifiers": [ - { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 168, - 172 - ], - "loc": { - "start": { - "line": 12, - "column": 14 - }, - "end": { - "line": 12, - "column": 18 - } - } - }, - "range": [ - 159, - 172 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 487, - 493 - ], - "loc": { - "start": { - "line": 27, - "column": 25 - }, - "end": { - "line": 27, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 613, - 619 - ], - "loc": { - "start": { - "line": 33, - "column": 7 - }, - "end": { - "line": 33, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - } - ] - }, - { - "name": "stopOthers", - "identifiers": [ - { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 185, - 195 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 185, - 195 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "current", - "range": [ - 236, - 243 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 43 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "pause", - "range": [ - 244, - 249 - ], - "loc": { - "start": { - "line": 15, - "column": 44 - }, - "end": { - "line": 15, - "column": 49 - } - } - }, - "range": [ - 236, - 249 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 49 - } - } - }, - "optional": false, - "range": [ - 236, - 251 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 51 - } - } - }, - "range": [ - 236, - 252 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 52 - } - } - }, - "test": { - "type": "LogicalExpression", - "left": { - "type": "Identifier", - "name": "current", - "range": [ - 206, - 213 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "operator": "&&", - "right": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 24 - } - } - }, - "operator": "!==", - "right": { - "type": "Identifier", - "name": "audio", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 15, - "column": 29 - }, - "end": { - "line": 15, - "column": 34 - } - } - }, - "range": [ - 217, - 234 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 34 - } - } - }, - "range": [ - 206, - 234 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 34 - } - } - }, - "range": [ - 202, - 252 - ], - "loc": { - "start": { - "line": 15, - "column": 2 - }, - "end": { - "line": 15, - "column": 52 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "current", - "range": [ - 255, - 262 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "audio", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "range": [ - 255, - 270 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "range": [ - 255, - 271 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 18 - } - } - } - ], - "range": [ - 198, - 274 - ], - "loc": { - "start": { - "line": 14, - "column": 23 - }, - "end": { - "line": 17, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 185, - 195 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 20 - } - } - }, - "params": [], - "range": [ - 176, - 274 - ], - "loc": { - "start": { - "line": 14, - "column": 1 - }, - "end": { - "line": 17, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 631, - 641 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 185, - 195 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 487, - 493 - ], - "loc": { - "start": { - "line": 27, - "column": 25 - }, - "end": { - "line": 27, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "title", - "range": [ - 502, - 507 - ], - "loc": { - "start": { - "line": 28, - "column": 6 - }, - "end": { - "line": 28, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "title", - "range": [ - 89, - 94 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "composer", - "range": [ - 527, - 535 - ], - "loc": { - "start": { - "line": 29, - "column": 13 - }, - "end": { - "line": 29, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "composer", - "range": [ - 108, - 116 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "performer", - "range": [ - 562, - 571 - ], - "loc": { - "start": { - "line": 29, - "column": 48 - }, - "end": { - "line": 29, - "column": 57 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "performer", - "range": [ - 130, - 139 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 599, - 604 - ], - "loc": { - "start": { - "line": 32, - "column": 13 - }, - "end": { - "line": 32, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "paused", - "range": [ - 613, - 619 - ], - "loc": { - "start": { - "line": 33, - "column": 7 - }, - "end": { - "line": 33, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "paused", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 631, - 641 - ], - "loc": { - "start": { - "line": 34, - "column": 11 - }, - "end": { - "line": 34, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "stopOthers", - "range": [ - 185, - 195 - ], - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "src", - "range": [ - 657, - 660 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "src", - "range": [ - 72, - 75 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 206, - 213 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 15, - "column": 29 - }, - "end": { - "line": 15, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 236, - 243 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 255, - 262 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 206, - 213 - ], - "loc": { - "start": { - "line": 15, - "column": 6 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 15, - "column": 17 - }, - "end": { - "line": 15, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 15, - "column": 29 - }, - "end": { - "line": 15, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 236, - 243 - ], - "loc": { - "start": { - "line": 15, - "column": 36 - }, - "end": { - "line": 15, - "column": 43 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "current", - "range": [ - 255, - 262 - ], - "loc": { - "start": { - "line": 16, - "column": 2 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "current", - "range": [ - 31, - 38 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "audio", - "range": [ - 265, - 270 - ], - "loc": { - "start": { - "line": 16, - "column": 12 - }, - "end": { - "line": 16, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "audio", - "range": [ - 147, - 152 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 10 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json index 10df24eb..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,261 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Box", - "identifiers": [ - { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 132, - 135 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 132, - 135 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json index 6b62e0b3..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1023 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Hoverable", - "identifiers": [ - { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "active", - "identifiers": [ - { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "hovering", - "range": [ - 231, - 239 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 23 - } - } - }, - "modifiers": [], - "range": [ - 227, - 239 - ], - "loc": { - "start": { - "line": 18, - "column": 11 - }, - "end": { - "line": 18, - "column": 23 - } - } - }, - "expression": { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - }, - "range": [ - 227, - 248 - ], - "loc": { - "start": { - "line": 18, - "column": 11 - }, - "end": { - "line": 18, - "column": 32 - } - } - } - ], - "selfClosing": false, - "range": [ - 216, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 0 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 249, - 251 - ], - "loc": { - "start": { - "line": 18, - "column": 33 - }, - "end": { - "line": 19, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 252, - 255 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Class", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "active", - "range": [ - 262, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "modifiers": [], - "range": [ - 256, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 6 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "expression": { - "type": "Identifier", - "name": "active", - "range": [ - 262, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "shorthand": true, - "range": [ - 256, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 6 - }, - "end": { - "line": 19, - "column": 18 - } - } - } - ], - "selfClosing": false, - "range": [ - 251, - 269 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 19 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 269, - 272 - ], - "loc": { - "start": { - "line": 19, - "column": 19 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - { - "type": "SvelteIfBlock", - "elseif": false, - "expression": { - "type": "Identifier", - "name": "active", - "range": [ - 277, - 283 - ], - "loc": { - "start": { - "line": 20, - "column": 7 - }, - "end": { - "line": 20, - "column": 13 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 289, - 290 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 288, - 291 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "I am being hovered upon.", - "range": [ - 291, - 315 - ], - "loc": { - "start": { - "line": 21, - "column": 6 - }, - "end": { - "line": 21, - "column": 30 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 315, - 319 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 34 - } - } - }, - "range": [ - 288, - 319 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 34 - } - } - } - ], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 334, - 335 - ], - "loc": { - "start": { - "line": 23, - "column": 4 - }, - "end": { - "line": 23, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 333, - 336 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "Hover over me!", - "range": [ - 336, - 350 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 20 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 23, - "column": 20 - }, - "end": { - "line": 23, - "column": 24 - } - } - }, - "range": [ - 333, - 354 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 24 - } - } - } - ], - "range": [ - 322, - 357 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "range": [ - 272, - 362 - ], - "loc": { - "start": { - "line": 20, - "column": 2 - }, - "end": { - "line": 24, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 362, - 364 - ], - "loc": { - "start": { - "line": 24, - "column": 7 - }, - "end": { - "line": 25, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 364, - 370 - ], - "loc": { - "start": { - "line": 25, - "column": 1 - }, - "end": { - "line": 25, - "column": 7 - } - } - }, - "range": [ - 251, - 370 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 25, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 370, - 371 - ], - "loc": { - "start": { - "line": 25, - "column": 7 - }, - "end": { - "line": 26, - "column": 0 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 371, - 383 - ], - "loc": { - "start": { - "line": 26, - "column": 0 - }, - "end": { - "line": 26, - "column": 12 - } - } - }, - "range": [ - 216, - 383 - ], - "loc": { - "start": { - "line": 18, - "column": 0 - }, - "end": { - "line": 26, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 262, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 277, - 283 - ], - "loc": { - "start": { - "line": 20, - "column": 7 - }, - "end": { - "line": 20, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 262, - 268 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "active", - "range": [ - 277, - 283 - ], - "loc": { - "start": { - "line": 20, - "column": 7 - }, - "end": { - "line": 20, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "active", - "range": [ - 241, - 247 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 31 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json index ff33861e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,971 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "hovering", - "identifiers": [ - { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "init": null, - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 90, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 189, - 197 - ], - "loc": { - "start": { - "line": 14, - "column": 17 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "enter", - "identifiers": [ - { - "type": "Identifier", - "name": "enter", - "range": [ - 35, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "enter", - "range": [ - 35, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "hovering", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 58, - 62 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "range": [ - 47, - 62 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "range": [ - 47, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 18 - } - } - } - ], - "range": [ - 43, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "enter", - "range": [ - 35, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [], - "range": [ - 26, - 66 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "enter", - "range": [ - 142, - 147 - ], - "loc": { - "start": { - "line": 13, - "column": 20 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "enter", - "range": [ - 35, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - }, - { - "name": "leave", - "identifiers": [ - { - "type": "Identifier", - "name": "leave", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "leave", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "hovering", - "range": [ - 90, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 101, - 106 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "range": [ - 90, - 106 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "range": [ - 90, - 107 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 19 - } - } - } - ], - "range": [ - 86, - 110 - ], - "loc": { - "start": { - "line": 8, - "column": 18 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "leave", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "params": [], - "range": [ - 69, - 110 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "leave", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 13, - "column": 42 - }, - "end": { - "line": 13, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "leave", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "enter", - "range": [ - 142, - 147 - ], - "loc": { - "start": { - "line": 13, - "column": 20 - }, - "end": { - "line": 13, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "enter", - "range": [ - 35, - 40 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "leave", - "range": [ - 164, - 169 - ], - "loc": { - "start": { - "line": 13, - "column": 42 - }, - "end": { - "line": 13, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "leave", - "range": [ - 78, - 83 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 189, - 197 - ], - "loc": { - "start": { - "line": 14, - "column": 17 - }, - "end": { - "line": 14, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 90, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 90, - 98 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 14, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json index 9c3ac71e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1023 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Hoverable", - "identifiers": [ - { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 17, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "hovering", - "identifiers": [ - { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "node": { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Hoverable", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Let", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "hovering", - "range": [ - 231, - 239 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 23 - } - } - }, - "modifiers": [], - "range": [ - 227, - 239 - ], - "loc": { - "start": { - "line": 18, - "column": 11 - }, - "end": { - "line": 18, - "column": 23 - } - } - }, - "expression": { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "range": [ - 227, - 250 - ], - "loc": { - "start": { - "line": 18, - "column": 11 - }, - "end": { - "line": 18, - "column": 34 - } - } - } - ], - "selfClosing": false, - "range": [ - 216, - 251 - ], - "loc": { - "start": { - "line": 18, - "column": 0 - }, - "end": { - "line": 18, - "column": 35 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 251, - 253 - ], - "loc": { - "start": { - "line": 18, - "column": 35 - }, - "end": { - "line": 19, - "column": 1 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "div", - "range": [ - 254, - 257 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteDirective", - "kind": "Class", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "active", - "range": [ - 264, - 270 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "modifiers": [], - "range": [ - 258, - 270 - ], - "loc": { - "start": { - "line": 19, - "column": 6 - }, - "end": { - "line": 19, - "column": 18 - } - } - }, - "expression": { - "type": "Identifier", - "name": "hovering", - "range": [ - 272, - 280 - ], - "loc": { - "start": { - "line": 19, - "column": 20 - }, - "end": { - "line": 19, - "column": 28 - } - } - }, - "shorthand": false, - "range": [ - 258, - 281 - ], - "loc": { - "start": { - "line": 19, - "column": 6 - }, - "end": { - "line": 19, - "column": 29 - } - } - } - ], - "selfClosing": false, - "range": [ - 253, - 282 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t", - "range": [ - 282, - 285 - ], - "loc": { - "start": { - "line": 19, - "column": 30 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - { - "type": "SvelteIfBlock", - "elseif": false, - "expression": { - "type": "Identifier", - "name": "hovering", - "range": [ - 290, - 298 - ], - "loc": { - "start": { - "line": 20, - "column": 7 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 304, - 305 - ], - "loc": { - "start": { - "line": 21, - "column": 4 - }, - "end": { - "line": 21, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 303, - 306 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "I am being hovered upon.", - "range": [ - 306, - 330 - ], - "loc": { - "start": { - "line": 21, - "column": 6 - }, - "end": { - "line": 21, - "column": 30 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 330, - 334 - ], - "loc": { - "start": { - "line": 21, - "column": 30 - }, - "end": { - "line": 21, - "column": 34 - } - } - }, - "range": [ - 303, - 334 - ], - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 34 - } - } - } - ], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "p", - "range": [ - 349, - 350 - ], - "loc": { - "start": { - "line": 23, - "column": 4 - }, - "end": { - "line": 23, - "column": 5 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 348, - 351 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 6 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "Hover over me!", - "range": [ - 351, - 365 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 20 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 365, - 369 - ], - "loc": { - "start": { - "line": 23, - "column": 20 - }, - "end": { - "line": 23, - "column": 24 - } - } - }, - "range": [ - 348, - 369 - ], - "loc": { - "start": { - "line": 23, - "column": 3 - }, - "end": { - "line": 23, - "column": 24 - } - } - } - ], - "range": [ - 337, - 372 - ], - "loc": { - "start": { - "line": 22, - "column": 2 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "range": [ - 285, - 377 - ], - "loc": { - "start": { - "line": 20, - "column": 2 - }, - "end": { - "line": 24, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t", - "range": [ - 377, - 379 - ], - "loc": { - "start": { - "line": 24, - "column": 7 - }, - "end": { - "line": 25, - "column": 1 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 379, - 385 - ], - "loc": { - "start": { - "line": 25, - "column": 1 - }, - "end": { - "line": 25, - "column": 7 - } - } - }, - "range": [ - 253, - 385 - ], - "loc": { - "start": { - "line": 19, - "column": 1 - }, - "end": { - "line": 25, - "column": 7 - } - } - }, - { - "type": "SvelteText", - "value": "\n", - "range": [ - 385, - 386 - ], - "loc": { - "start": { - "line": 25, - "column": 7 - }, - "end": { - "line": 26, - "column": 0 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 386, - 398 - ], - "loc": { - "start": { - "line": 26, - "column": 0 - }, - "end": { - "line": 26, - "column": 12 - } - } - }, - "range": [ - 216, - 398 - ], - "loc": { - "start": { - "line": 18, - "column": 0 - }, - "end": { - "line": 26, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 272, - 280 - ], - "loc": { - "start": { - "line": 19, - "column": 20 - }, - "end": { - "line": 19, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 290, - 298 - ], - "loc": { - "start": { - "line": 20, - "column": 7 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 272, - 280 - ], - "loc": { - "start": { - "line": 19, - "column": 20 - }, - "end": { - "line": 19, - "column": 28 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hovering", - "range": [ - 290, - 298 - ], - "loc": { - "start": { - "line": 20, - "column": 7 - }, - "end": { - "line": 20, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hovering", - "range": [ - 241, - 249 - ], - "loc": { - "start": { - "line": 18, - "column": 25 - }, - "end": { - "line": 18, - "column": 33 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json index 2bcbc4fe..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Box", - "identifiers": [ - { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 54, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json index ccaaf775..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,915 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Info", - "identifiers": [ - { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Info", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "pkg", - "identifiers": [ - { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'svelte'", - "value": "svelte", - "range": [ - 68, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "range": [ - 62, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "version", - "range": [ - 80, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 89, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 80, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'blazing'", - "value": "blazing", - "range": [ - 101, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 94, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "website", - "range": [ - 114, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'https://svelte.dev'", - "value": "https://svelte.dev", - "range": [ - 123, - 143 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 31 - } - } - }, - "range": [ - 114, - 143 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 31 - } - } - } - ], - "range": [ - 58, - 146 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "range": [ - 52, - 146 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 190, - 193 - ], - "loc": { - "start": { - "line": 12, - "column": 31 - }, - "end": { - "line": 12, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 210, - 213 - ], - "loc": { - "start": { - "line": 12, - "column": 51 - }, - "end": { - "line": 12, - "column": 54 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 230, - 233 - ], - "loc": { - "start": { - "line": 12, - "column": 71 - }, - "end": { - "line": 12, - "column": 74 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 12, - "column": 12 - }, - "end": { - "line": 12, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 190, - 193 - ], - "loc": { - "start": { - "line": 12, - "column": 31 - }, - "end": { - "line": 12, - "column": 34 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 210, - 213 - ], - "loc": { - "start": { - "line": 12, - "column": 51 - }, - "end": { - "line": 12, - "column": 54 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 230, - 233 - ], - "loc": { - "start": { - "line": 12, - "column": 71 - }, - "end": { - "line": 12, - "column": 74 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Info", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json index faa49206..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,914 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": null, - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 115, - 119 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 10, - "column": 73 - }, - "end": { - "line": 10, - "column": 77 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - }, - { - "name": "version", - "identifiers": [ - { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "init": null, - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "version", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ] - }, - { - "name": "speed", - "identifiers": [ - { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "init": null, - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 140, - 145 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ] - }, - { - "name": "website", - "identifiers": [ - { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "init": null, - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "website", - "range": [ - 255, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 14 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 115, - 119 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "speed", - "range": [ - 140, - 145 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "speed", - "range": [ - 60, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "version", - "range": [ - 172, - 179 - ], - "loc": { - "start": { - "line": 10, - "column": 19 - }, - "end": { - "line": 10, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "version", - "range": [ - 39, - 46 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 226, - 230 - ], - "loc": { - "start": { - "line": 10, - "column": 73 - }, - "end": { - "line": 10, - "column": 77 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "website", - "range": [ - 255, - 262 - ], - "loc": { - "start": { - "line": 11, - "column": 14 - }, - "end": { - "line": 11, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "website", - "range": [ - 79, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 19 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json index 12b40a8b..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,675 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Info", - "identifiers": [ - { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Info", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "pkg", - "identifiers": [ - { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "init": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 62, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'svelte'", - "value": "svelte", - "range": [ - 68, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "range": [ - 62, - 76 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "version", - "range": [ - 80, - 87 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 89, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - "range": [ - 80, - 90 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 12 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "speed", - "range": [ - 94, - 99 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'blazing'", - "value": "blazing", - "range": [ - 101, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 94, - 110 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "website", - "range": [ - 114, - 121 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'https://svelte.dev'", - "value": "https://svelte.dev", - "range": [ - 123, - 143 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 31 - } - } - }, - "range": [ - 114, - 143 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 31 - } - } - } - ], - "range": [ - 58, - 146 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 9, - "column": 2 - } - } - }, - "range": [ - 52, - 146 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 9, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 169, - 172 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "pkg", - "range": [ - 169, - 172 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "pkg", - "range": [ - 52, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Info", - "range": [ - 160, - 164 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 5 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Info", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json index 8cc22f29..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2490 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "spring", - "identifiers": [ - { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "local": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "spring", - "range": [ - 65, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "spring", - "range": [ - 143, - 149 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - }, - { - "name": "coords", - "identifiers": [ - { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 74, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 77, - 79 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 81, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 31 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "50", - "value": 50, - "range": [ - 84, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 33 - }, - "end": { - "line": 4, - "column": 35 - } - } - }, - "range": [ - 81, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 30 - }, - "end": { - "line": 4, - "column": 35 - } - } - } - ], - "range": [ - 72, - 88 - ], - "loc": { - "start": { - "line": 4, - "column": 21 - }, - "end": { - "line": 4, - "column": 37 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "stiffness", - "range": [ - 94, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0.1", - "value": 0.1, - "range": [ - 105, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 13 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "range": [ - 94, - 108 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "damping", - "range": [ - 112, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "0.25", - "value": 0.25, - "range": [ - 121, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "range": [ - 112, - 125 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "range": [ - 90, - 128 - ], - "loc": { - "start": { - "line": 4, - "column": 39 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "spring", - "range": [ - 65, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "optional": false, - "range": [ - 65, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 7, - "column": 3 - } - } - }, - "range": [ - 56, - 129 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 7, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 333, - 339 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 378, - 384 - ], - "loc": { - "start": { - "line": 19, - "column": 21 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 474, - 480 - ], - "loc": { - "start": { - "line": 23, - "column": 16 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 517, - 523 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 619, - 625 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 751, - 758 - ], - "loc": { - "start": { - "line": 33, - "column": 13 - }, - "end": { - "line": 33, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 766, - 773 - ], - "loc": { - "start": { - "line": 33, - "column": 28 - }, - "end": { - "line": 33, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 766, - 773 - ], - "loc": { - "start": { - "line": 33, - "column": 28 - }, - "end": { - "line": 33, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - }, - { - "name": "size", - "identifiers": [ - { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "10", - "value": 10, - "range": [ - 150, - 152 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 8, - "column": 21 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "spring", - "range": [ - 143, - 149 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "optional": false, - "range": [ - 143, - 153 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 22 - } - } - }, - "range": [ - 136, - 153 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 686, - 690 - ], - "loc": { - "start": { - "line": 30, - "column": 22 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 721, - 725 - ], - "loc": { - "start": { - "line": 31, - "column": 20 - }, - "end": { - "line": 31, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$size", - "range": [ - 780, - 785 - ], - "loc": { - "start": { - "line": 33, - "column": 42 - }, - "end": { - "line": 33, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "spring", - "range": [ - 65, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "spring", - "range": [ - 143, - 149 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "spring", - "range": [ - 19, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 333, - 339 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 378, - 384 - ], - "loc": { - "start": { - "line": 19, - "column": 21 - }, - "end": { - "line": 19, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 474, - 480 - ], - "loc": { - "start": { - "line": 23, - "column": 16 - }, - "end": { - "line": 23, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 517, - 523 - ], - "loc": { - "start": { - "line": 24, - "column": 21 - }, - "end": { - "line": 24, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 751, - 758 - ], - "loc": { - "start": { - "line": 33, - "column": 13 - }, - "end": { - "line": 33, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$coords", - "range": [ - 766, - 773 - ], - "loc": { - "start": { - "line": 33, - "column": 28 - }, - "end": { - "line": 33, - "column": 35 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$size", - "range": [ - 780, - 785 - ], - "loc": { - "start": { - "line": 33, - "column": 42 - }, - "end": { - "line": 33, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "x", - "range": [ - 632, - 633 - ], - "loc": { - "start": { - "line": 29, - "column": 34 - }, - "end": { - "line": 29, - "column": 35 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 635, - 636 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 38 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientX", - "range": [ - 637, - 644 - ], - "loc": { - "start": { - "line": 29, - "column": 39 - }, - "end": { - "line": 29, - "column": 46 - } - } - }, - "range": [ - 635, - 644 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 46 - } - } - }, - "range": [ - 632, - 644 - ], - "loc": { - "start": { - "line": 29, - "column": 34 - }, - "end": { - "line": 29, - "column": 46 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "y", - "range": [ - 646, - 647 - ], - "loc": { - "start": { - "line": 29, - "column": 48 - }, - "end": { - "line": 29, - "column": 49 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "e", - "range": [ - 649, - 650 - ], - "loc": { - "start": { - "line": 29, - "column": 51 - }, - "end": { - "line": 29, - "column": 52 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "clientY", - "range": [ - 651, - 658 - ], - "loc": { - "start": { - "line": 29, - "column": 53 - }, - "end": { - "line": 29, - "column": 60 - } - } - }, - "range": [ - 649, - 658 - ], - "loc": { - "start": { - "line": 29, - "column": 51 - }, - "end": { - "line": 29, - "column": 60 - } - } - }, - "range": [ - 646, - 658 - ], - "loc": { - "start": { - "line": 29, - "column": 48 - }, - "end": { - "line": 29, - "column": 60 - } - } - } - ], - "range": [ - 630, - 660 - ], - "loc": { - "start": { - "line": 29, - "column": 32 - }, - "end": { - "line": 29, - "column": 62 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "coords", - "range": [ - 619, - 625 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 27 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "set", - "range": [ - 626, - 629 - ], - "loc": { - "start": { - "line": 29, - "column": 28 - }, - "end": { - "line": 29, - "column": 31 - } - } - }, - "range": [ - 619, - 629 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 619, - 661 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - } - ], - "range": [ - 614, - 661 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 63 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 635, - 636 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 649, - 650 - ], - "loc": { - "start": { - "line": 29, - "column": 51 - }, - "end": { - "line": 29, - "column": 52 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 619, - 625 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 635, - 636 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "e", - "range": [ - 649, - 650 - ], - "loc": { - "start": { - "line": 29, - "column": 51 - }, - "end": { - "line": 29, - "column": 52 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "e", - "range": [ - 614, - 615 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 17 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "coords", - "range": [ - 619, - 625 - ], - "loc": { - "start": { - "line": 29, - "column": 21 - }, - "end": { - "line": 29, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "coords", - "range": [ - 56, - 62 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 686, - 690 - ], - "loc": { - "start": { - "line": 30, - "column": 22 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 686, - 690 - ], - "loc": { - "start": { - "line": 30, - "column": 22 - }, - "end": { - "line": 30, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 721, - 725 - ], - "loc": { - "start": { - "line": 31, - "column": 20 - }, - "end": { - "line": 31, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "size", - "range": [ - 721, - 725 - ], - "loc": { - "start": { - "line": 31, - "column": 20 - }, - "end": { - "line": 31, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "size", - "range": [ - 136, - 140 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 9 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json index eb9608a8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1179 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "hereKitty", - "identifiers": [ - { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 26, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - "range": [ - 14, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 41 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 116, - 125 - ], - "loc": { - "start": { - "line": 5, - "column": 32 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 621, - 630 - ], - "loc": { - "start": { - "line": 34, - "column": 16 - }, - "end": { - "line": 34, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "handleMouseenter", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 41 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 78, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 44 - }, - "end": { - "line": 4, - "column": 48 - } - } - }, - "range": [ - 66, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 48 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 60, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 26 - }, - "end": { - "line": 4, - "column": 48 - } - } - }, - "range": [ - 41, - 82 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 48 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 465, - 481 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - } - ] - }, - { - "name": "handleMouseleave", - "identifiers": [ - { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 116, - 125 - ], - "loc": { - "start": { - "line": 5, - "column": 32 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 128, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 44 - }, - "end": { - "line": 5, - "column": 49 - } - } - }, - "range": [ - 116, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 32 - }, - "end": { - "line": 5, - "column": 49 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 110, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 26 - }, - "end": { - "line": 5, - "column": 49 - } - } - }, - "range": [ - 91, - 133 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 49 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 499, - 515 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 465, - 481 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseenter", - "range": [ - 41, - 57 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 499, - 515 - ], - "loc": { - "start": { - "line": 29, - "column": 16 - }, - "end": { - "line": 29, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleMouseleave", - "range": [ - 91, - 107 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 621, - 630 - ], - "loc": { - "start": { - "line": 34, - "column": 16 - }, - "end": { - "line": 34, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 41 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 66, - 75 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 41 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 116, - 125 - ], - "loc": { - "start": { - "line": 5, - "column": 32 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 116, - 125 - ], - "loc": { - "start": { - "line": 5, - "column": 32 - }, - "end": { - "line": 5, - "column": 41 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "hereKitty", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json index 5de76ff9..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2128 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "RedThing", - "identifiers": [ - { - "type": "Identifier", - "name": "RedThing", - "range": [ - 17, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 17, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 17, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 17, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 195, - 203 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 17, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - }, - { - "name": "GreenThing", - "identifiers": [ - { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 60, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 60, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 60, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 60, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 240, - 250 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 60, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ] - }, - { - "name": "BlueThing", - "identifiers": [ - { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 17 - } - } - }, - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 285, - 294 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - } - ] - }, - { - "name": "options", - "identifiers": [ - { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 168, - 173 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'red'", - "value": "red", - "range": [ - 175, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - "range": [ - 168, - 180 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "component", - "range": [ - 184, - 193 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 29 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 195, - 203 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "range": [ - 184, - 203 - ], - "loc": { - "start": { - "line": 7, - "column": 20 - }, - "end": { - "line": 7, - "column": 39 - } - } - } - ], - "range": [ - 166, - 207 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 43 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 213, - 218 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'green'", - "value": "green", - "range": [ - 220, - 227 - ], - "loc": { - "start": { - "line": 8, - "column": 11 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "range": [ - 213, - 227 - ], - "loc": { - "start": { - "line": 8, - "column": 4 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "component", - "range": [ - 229, - 238 - ], - "loc": { - "start": { - "line": 8, - "column": 20 - }, - "end": { - "line": 8, - "column": 29 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 240, - 250 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "range": [ - 229, - 250 - ], - "loc": { - "start": { - "line": 8, - "column": 20 - }, - "end": { - "line": 8, - "column": 41 - } - } - } - ], - "range": [ - 211, - 252 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 43 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "color", - "range": [ - 258, - 263 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'blue'", - "value": "blue", - "range": [ - 265, - 271 - ], - "loc": { - "start": { - "line": 9, - "column": 11 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "range": [ - 258, - 271 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "component", - "range": [ - 274, - 283 - ], - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 29 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 285, - 294 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 274, - 294 - ], - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - ], - "range": [ - 256, - 297 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 43 - } - } - } - ], - "range": [ - 162, - 301 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "range": [ - 152, - 301 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 320, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 382, - 389 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - } - ] - }, - { - "name": "selected", - "identifiers": [ - { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "options", - "range": [ - 320, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 328, - 329 - ], - "loc": { - "start": { - "line": 12, - "column": 24 - }, - "end": { - "line": 12, - "column": 25 - } - } - }, - "range": [ - 320, - 330 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 26 - } - } - }, - "range": [ - 309, - 330 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 363, - 371 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 494, - 502 - ], - "loc": { - "start": { - "line": 21, - "column": 24 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 195, - 203 - ], - "loc": { - "start": { - "line": 7, - "column": 31 - }, - "end": { - "line": 7, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "RedThing", - "range": [ - 17, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 240, - 250 - ], - "loc": { - "start": { - "line": 8, - "column": 31 - }, - "end": { - "line": 8, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "GreenThing", - "range": [ - 60, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 285, - 294 - ], - "loc": { - "start": { - "line": 9, - "column": 31 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "BlueThing", - "range": [ - 107, - 116 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 320, - 327 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 363, - 371 - ], - "loc": { - "start": { - "line": 15, - "column": 20 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 382, - 389 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 152, - 159 - ], - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 6, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 494, - 502 - ], - "loc": { - "start": { - "line": 21, - "column": 24 - }, - "end": { - "line": 21, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 309, - 317 - ], - "loc": { - "start": { - "line": 12, - "column": 5 - }, - "end": { - "line": 12, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "option", - "identifiers": [ - { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "options", - "range": [ - 382, - 389 - ], - "loc": { - "start": { - "line": 16, - "column": 8 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "context": { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "option", - "range": [ - 404, - 410 - ], - "loc": { - "start": { - "line": 17, - "column": 3 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "value", - "range": [ - 411, - 416 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "option", - "range": [ - 418, - 424 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "range": [ - 417, - 425 - ], - "loc": { - "start": { - "line": 17, - "column": 16 - }, - "end": { - "line": 17, - "column": 24 - } - } - } - ], - "range": [ - 411, - 425 - ], - "loc": { - "start": { - "line": 17, - "column": 10 - }, - "end": { - "line": 17, - "column": 24 - } - } - } - ], - "selfClosing": false, - "range": [ - 403, - 426 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 25 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "option", - "range": [ - 427, - 433 - ], - "loc": { - "start": { - "line": 17, - "column": 26 - }, - "end": { - "line": 17, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "color", - "range": [ - 434, - 439 - ], - "loc": { - "start": { - "line": 17, - "column": 33 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - "range": [ - 427, - 439 - ], - "loc": { - "start": { - "line": 17, - "column": 26 - }, - "end": { - "line": 17, - "column": 38 - } - } - }, - "range": [ - 426, - 440 - ], - "loc": { - "start": { - "line": 17, - "column": 25 - }, - "end": { - "line": 17, - "column": 39 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 440, - 449 - ], - "loc": { - "start": { - "line": 17, - "column": 39 - }, - "end": { - "line": 17, - "column": 48 - } - } - }, - "range": [ - 403, - 449 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 48 - } - } - } - ], - "else": null, - "range": [ - 375, - 458 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 18, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 418, - 424 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 427, - 433 - ], - "loc": { - "start": { - "line": 17, - "column": 26 - }, - "end": { - "line": 17, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 418, - 424 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 427, - 433 - ], - "loc": { - "start": { - "line": 17, - "column": 26 - }, - "end": { - "line": 17, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 393, - 399 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 25 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json index f7fd8ea8..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1097 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "selection", - "identifiers": [ - { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 26, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 14, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "handleSelectionChange", - "identifiers": [ - { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "init": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "selection", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "document", - "range": [ - 81, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 58 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getSelection", - "range": [ - 90, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 59 - }, - "end": { - "line": 4, - "column": 71 - } - } - }, - "range": [ - 81, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 71 - } - } - }, - "optional": false, - "range": [ - 81, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 73 - } - } - }, - "range": [ - 69, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 63, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 33 - } - } - } - ], - "range": [ - 62, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 4, - "column": 73 - } - } - }, - "range": [ - 38, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 73 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 154, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 37 - }, - "end": { - "line": 7, - "column": 58 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 154, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 37 - }, - "end": { - "line": 7, - "column": 58 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleSelectionChange", - "range": [ - 38, - 59 - ], - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "e", - "identifiers": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 63, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 33 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "e", - "range": [ - 63, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 33 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "selection", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "document", - "range": [ - 81, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 58 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getSelection", - "range": [ - 90, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 59 - }, - "end": { - "line": 4, - "column": 71 - } - } - }, - "range": [ - 81, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 71 - } - } - }, - "optional": false, - "range": [ - 81, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 73 - } - } - }, - "range": [ - 69, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 73 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "e", - "range": [ - 63, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 32 - }, - "end": { - "line": 4, - "column": 33 - } - } - } - ], - "range": [ - 62, - 104 - ], - "loc": { - "start": { - "line": 4, - "column": 31 - }, - "end": { - "line": 4, - "column": 73 - } - } - } - } - ], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 81, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 58 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 4, - "column": 38 - }, - "end": { - "line": 4, - "column": 47 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 14, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 81, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 58 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 81, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 58 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "document", - "range": [ - 81, - 89 - ], - "loc": { - "start": { - "line": 4, - "column": 50 - }, - "end": { - "line": 4, - "column": 58 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json index 3e1b929d..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1337 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "options", - "identifiers": [ - { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "'h1'", - "value": "h1", - "range": [ - 27, - 31 - ], - "loc": { - "start": { - "line": 2, - "column": 18 - }, - "end": { - "line": 2, - "column": 22 - } - } - }, - { - "type": "Literal", - "raw": "'h3'", - "value": "h3", - "range": [ - 33, - 37 - ], - "loc": { - "start": { - "line": 2, - "column": 24 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - { - "type": "Literal", - "raw": "'p'", - "value": "p", - "range": [ - 39, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 33 - } - } - } - ], - "range": [ - 26, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 34 - } - } - }, - "range": [ - 16, - 43 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 34 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 61, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 123, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "selected", - "identifiers": [ - { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": true, - "object": { - "type": "Identifier", - "name": "options", - "range": [ - 61, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 69, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 25 - } - } - }, - "range": [ - 61, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "range": [ - 50, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 104, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 244, - 252 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 227, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 22 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 61, - 68 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 104, - 112 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "options", - "range": [ - 123, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "options", - "range": [ - 16, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 244, - 252 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selected", - "range": [ - 227, - 235 - ], - "loc": { - "start": { - "line": 12, - "column": 22 - }, - "end": { - "line": 12, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selected", - "range": [ - 50, - 58 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "option", - "identifiers": [ - { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "options", - "range": [ - 123, - 130 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "context": { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "option", - "range": [ - 145, - 151 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "value", - "range": [ - 152, - 157 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 15 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "option", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "range": [ - 158, - 166 - ], - "loc": { - "start": { - "line": 8, - "column": 16 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - ], - "range": [ - 152, - 166 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 24 - } - } - } - ], - "selfClosing": false, - "range": [ - 144, - 167 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "option", - "range": [ - 168, - 174 - ], - "loc": { - "start": { - "line": 8, - "column": 26 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - "range": [ - 167, - 175 - ], - "loc": { - "start": { - "line": 8, - "column": 25 - }, - "end": { - "line": 8, - "column": 33 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 175, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 33 - }, - "end": { - "line": 8, - "column": 42 - } - } - }, - "range": [ - 144, - 184 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 42 - } - } - } - ], - "else": null, - "range": [ - 116, - 193 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 9, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 168, - 174 - ], - "loc": { - "start": { - "line": 8, - "column": 26 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 159, - 165 - ], - "loc": { - "start": { - "line": 8, - "column": 17 - }, - "end": { - "line": 8, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "option", - "range": [ - 168, - 174 - ], - "loc": { - "start": { - "line": 8, - "column": 26 - }, - "end": { - "line": 8, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "option", - "range": [ - 134, - 140 - ], - "loc": { - "start": { - "line": 7, - "column": 19 - }, - "end": { - "line": 7, - "column": 25 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json index 192a2d80..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,181 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Box", - "identifiers": [ - { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - }, - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Box", - "range": [ - 53, - 56 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 4 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Box", - "range": [ - 17, - 20 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json index 4c868271..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,16 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json index 214fd6c1..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,4832 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Todo", - "identifiers": [ - { - "type": "Identifier", - "name": "Todo", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Todo", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Todo", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Todo", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Todo", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "todos", - "identifiers": [ - { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 64, - 66 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 68, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "range": [ - 64, - 69 - ], - "loc": { - "start": { - "line": 5, - "column": 4 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 71, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 77, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 17 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "range": [ - 71, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 11 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 83, - 87 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'wash the car'", - "value": "wash the car", - "range": [ - 89, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 5, - "column": 43 - } - } - }, - "range": [ - 83, - 103 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 43 - } - } - } - ], - "range": [ - 62, - 105 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 45 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 111, - 113 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 115, - 116 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "range": [ - 111, - 116 - ], - "loc": { - "start": { - "line": 6, - "column": 4 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 118, - 122 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 124, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 17 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - "range": [ - 118, - 129 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 22 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 24 - }, - "end": { - "line": 6, - "column": 28 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'take the dog for a walk'", - "value": "take the dog for a walk", - "range": [ - 137, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 30 - }, - "end": { - "line": 6, - "column": 55 - } - } - }, - "range": [ - 131, - 162 - ], - "loc": { - "start": { - "line": 6, - "column": 24 - }, - "end": { - "line": 6, - "column": 55 - } - } - } - ], - "range": [ - 109, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 57 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 170, - 172 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 6 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 174, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 8 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "range": [ - 170, - 175 - ], - "loc": { - "start": { - "line": 7, - "column": 4 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 177, - 181 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 183, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 17 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - "range": [ - 177, - 188 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 22 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 190, - 194 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 28 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'mow the lawn'", - "value": "mow the lawn", - "range": [ - 196, - 210 - ], - "loc": { - "start": { - "line": 7, - "column": 30 - }, - "end": { - "line": 7, - "column": 44 - } - } - }, - "range": [ - 190, - 210 - ], - "loc": { - "start": { - "line": 7, - "column": 24 - }, - "end": { - "line": 7, - "column": 44 - } - } - } - ], - "range": [ - 168, - 212 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 46 - } - } - } - ], - "range": [ - 58, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "range": [ - 50, - 215 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - }, - { - "name": "toggle", - "identifiers": [ - { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 348, - 350 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 357, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "range": [ - 348, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 372, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "range": [ - 372, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "range": [ - 366, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 388, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 395, - 399 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 400, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 395, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 394, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 388, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - ], - "range": [ - 341, - 410 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 334, - 411 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 18, - "column": 6 - } - } - } - ], - "range": [ - 301, - 416 - ], - "loc": { - "start": { - "line": 12, - "column": 25 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "todo", - "range": [ - 283, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "operator": "===", - "right": { - "type": "Identifier", - "name": "toggled", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "range": [ - 283, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "range": [ - 279, - 416 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "Identifier", - "name": "todo", - "range": [ - 457, - 461 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 14 - } - } - }, - "range": [ - 450, - 462 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 15 - } - } - } - ], - "range": [ - 274, - 466 - ], - "loc": { - "start": { - "line": 11, - "column": 28 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - ], - "range": [ - 266, - 466 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 23, - "column": 3 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "map", - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "range": [ - 256, - 265 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 256, - 467 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 23, - "column": 4 - } - } - }, - "range": [ - 248, - 467 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 23, - "column": 4 - } - } - }, - "range": [ - 248, - 468 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 23, - "column": 5 - } - } - } - ], - "range": [ - 244, - 471 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - ], - "range": [ - 219, - 471 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 24, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 550, - 556 - ], - "loc": { - "start": { - "line": 29, - "column": 30 - }, - "end": { - "line": 29, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "toggled", - "identifiers": [ - { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "todos", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 348, - 350 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 357, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "range": [ - 348, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 372, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "range": [ - 372, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "range": [ - 366, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 388, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 395, - 399 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 400, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 395, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 394, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 388, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - ], - "range": [ - 341, - 410 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 334, - 411 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 18, - "column": 6 - } - } - } - ], - "range": [ - 301, - 416 - ], - "loc": { - "start": { - "line": 12, - "column": 25 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "todo", - "range": [ - 283, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "operator": "===", - "right": { - "type": "Identifier", - "name": "toggled", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "range": [ - 283, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "range": [ - 279, - 416 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "Identifier", - "name": "todo", - "range": [ - 457, - 461 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 14 - } - } - }, - "range": [ - 450, - 462 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 15 - } - } - } - ], - "range": [ - 274, - 466 - ], - "loc": { - "start": { - "line": 11, - "column": 28 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - ], - "range": [ - 266, - 466 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 23, - "column": 3 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todos", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "map", - "range": [ - 262, - 265 - ], - "loc": { - "start": { - "line": 11, - "column": 16 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "range": [ - 256, - 265 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 19 - } - } - }, - "optional": false, - "range": [ - 256, - 467 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 23, - "column": 4 - } - } - }, - "range": [ - 248, - 467 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 23, - "column": 4 - } - } - }, - "range": [ - 248, - 468 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 23, - "column": 5 - } - } - } - ], - "range": [ - 244, - 471 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 24, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - ], - "range": [ - 219, - 471 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 24, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggled", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "ReturnStatement", - "argument": { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "id", - "range": [ - 348, - 350 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "id", - "range": [ - 357, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 14 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "range": [ - 352, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - "range": [ - 348, - 359 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 372, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 377, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 16 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "range": [ - 372, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - "range": [ - 366, - 381 - ], - "loc": { - "start": { - "line": 16, - "column": 5 - }, - "end": { - "line": 16, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "done", - "range": [ - 388, - 392 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "todo", - "range": [ - 395, - 399 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "done", - "range": [ - 400, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 17 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 395, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 394, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 21 - } - } - }, - "range": [ - 388, - 404 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 21 - } - } - } - ], - "range": [ - 341, - 410 - ], - "loc": { - "start": { - "line": 14, - "column": 11 - }, - "end": { - "line": 18, - "column": 5 - } - } - }, - "range": [ - 334, - 411 - ], - "loc": { - "start": { - "line": 14, - "column": 4 - }, - "end": { - "line": 18, - "column": 6 - } - } - } - ], - "range": [ - 301, - 416 - ], - "loc": { - "start": { - "line": 12, - "column": 25 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "todo", - "range": [ - 283, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "operator": "===", - "right": { - "type": "Identifier", - "name": "toggled", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "range": [ - 283, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "range": [ - 279, - 416 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 19, - "column": 4 - } - } - }, - { - "type": "ReturnStatement", - "argument": { - "type": "Identifier", - "name": "todo", - "range": [ - 457, - 461 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 14 - } - } - }, - "range": [ - 450, - 462 - ], - "loc": { - "start": { - "line": 22, - "column": 3 - }, - "end": { - "line": 22, - "column": 15 - } - } - } - ], - "range": [ - 274, - 466 - ], - "loc": { - "start": { - "line": 11, - "column": 28 - }, - "end": { - "line": 23, - "column": 3 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - ], - "range": [ - 266, - 466 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 23, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 283, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 372, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 395, - 399 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 457, - 461 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 283, - 287 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "toggled", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 457, - 461 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 372, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 395, - 399 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 352, - 356 - ], - "loc": { - "start": { - "line": 15, - "column": 9 - }, - "end": { - "line": 15, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 372, - 376 - ], - "loc": { - "start": { - "line": 16, - "column": 11 - }, - "end": { - "line": 16, - "column": 15 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 395, - 399 - ], - "loc": { - "start": { - "line": 17, - "column": 12 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 24 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggled", - "range": [ - 292, - 299 - ], - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggled", - "range": [ - 235, - 242 - ], - "loc": { - "start": { - "line": 10, - "column": 17 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todos", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 11, - "column": 10 - }, - "end": { - "line": 11, - "column": 15 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todos", - "range": [ - 50, - 55 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 10 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "todos", - "range": [ - 505, - 510 - ], - "loc": { - "start": { - "line": 28, - "column": 7 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "context": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "Todo", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 6 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteShorthandAttribute", - "key": { - "type": "Identifier", - "name": "todo", - "range": [ - 528, - 532 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 12 - } - } - }, - "value": { - "type": "Identifier", - "name": "todo", - "range": [ - 528, - 532 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 12 - } - } - }, - "range": [ - 527, - 533 - ], - "loc": { - "start": { - "line": 29, - "column": 7 - }, - "end": { - "line": 29, - "column": 13 - } - } - }, - { - "type": "SvelteDirective", - "kind": "EventHandler", - "key": { - "type": "SvelteDirectiveKey", - "name": { - "type": "SvelteName", - "name": "click", - "range": [ - 537, - 542 - ], - "loc": { - "start": { - "line": 29, - "column": 17 - }, - "end": { - "line": 29, - "column": 22 - } - } - }, - "modifiers": [], - "range": [ - 534, - 542 - ], - "loc": { - "start": { - "line": 29, - "column": 14 - }, - "end": { - "line": 29, - "column": 22 - } - } - }, - "expression": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 557, - 561 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 41 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "toggle", - "range": [ - 550, - 556 - ], - "loc": { - "start": { - "line": 29, - "column": 30 - }, - "end": { - "line": 29, - "column": 36 - } - } - }, - "optional": false, - "range": [ - 550, - 562 - ], - "loc": { - "start": { - "line": 29, - "column": 30 - }, - "end": { - "line": 29, - "column": 42 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [], - "range": [ - 544, - 562 - ], - "loc": { - "start": { - "line": 29, - "column": 24 - }, - "end": { - "line": 29, - "column": 42 - } - } - }, - "range": [ - 534, - 563 - ], - "loc": { - "start": { - "line": 29, - "column": 14 - }, - "end": { - "line": 29, - "column": 43 - } - } - } - ], - "selfClosing": true, - "range": [ - 521, - 565 - ], - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 29, - "column": 45 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 521, - 565 - ], - "loc": { - "start": { - "line": 29, - "column": 1 - }, - "end": { - "line": 29, - "column": 45 - } - } - } - ], - "else": null, - "range": [ - 498, - 573 - ], - "loc": { - "start": { - "line": 28, - "column": 0 - }, - "end": { - "line": 30, - "column": 7 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 528, - 532 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 557, - 561 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 528, - 532 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Todo", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Todo", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 550, - 556 - ], - "loc": { - "start": { - "line": 29, - "column": 30 - }, - "end": { - "line": 29, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 557, - 561 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 550, - 556 - ], - "loc": { - "start": { - "line": 29, - "column": 30 - }, - "end": { - "line": 29, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 557, - 561 - ], - "loc": { - "start": { - "line": 29, - "column": 37 - }, - "end": { - "line": 29, - "column": 41 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 514, - 518 - ], - "loc": { - "start": { - "line": 28, - "column": 16 - }, - "end": { - "line": 28, - "column": 20 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 550, - 556 - ], - "loc": { - "start": { - "line": 29, - "column": 30 - }, - "end": { - "line": 29, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Todo", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 29, - "column": 2 - }, - "end": { - "line": 29, - "column": 6 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Todo", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json index 4a1358cd..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,980 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "afterUpdate", - "identifiers": [ - { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "local": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 150, - 161 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - }, - { - "name": "flash", - "identifiers": [ - { - "type": "Identifier", - "name": "flash", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "flash", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "flash", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flash", - "range": [ - 172, - 177 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flash", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "init": null, - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 373, - 377 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 25, - "column": 25 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ] - }, - { - "name": "div", - "identifiers": [ - { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "init": null, - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 178, - 181 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 356, - 359 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 150, - 161 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 56, - 67 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 356, - 359 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 373, - 377 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 396, - 400 - ], - "loc": { - "start": { - "line": 25, - "column": 25 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 131, - 135 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flash", - "range": [ - 172, - 177 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flash", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 178, - 181 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "flash", - "range": [ - 172, - 177 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flash", - "range": [ - 93, - 98 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 178, - 181 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 143, - 146 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json index 74b4083e..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,980 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "afterUpdate", - "identifiers": [ - { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "local": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 143, - 154 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - } - ] - }, - { - "name": "flash", - "identifiers": [ - { - "type": "Identifier", - "name": "flash", - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "flash", - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "flash", - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flash", - "range": [ - 165, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flash", - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - } - ] - }, - { - "name": "todo", - "identifiers": [ - { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "init": null, - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 389, - 393 - ], - "loc": { - "start": { - "line": 25, - "column": 25 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ] - }, - { - "name": "div", - "identifiers": [ - { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "init": null, - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 143, - 154 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 49, - 60 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 21 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 349, - 352 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "todo", - "range": [ - 389, - 393 - ], - "loc": { - "start": { - "line": 25, - "column": 25 - }, - "end": { - "line": 25, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "todo", - "range": [ - 124, - 128 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "flash", - "range": [ - 165, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flash", - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "flash", - "range": [ - 165, - 170 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "flash", - "range": [ - 86, - 91 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 171, - 174 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 136, - 139 - ], - "loc": { - "start": { - "line": 8, - "column": 5 - }, - "end": { - "line": 8, - "column": 8 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json index 09e7dd38..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2430 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Folder", - "identifiers": [ - { - "type": "Identifier", - "name": "Folder", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Folder", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Folder", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Folder", - "range": [ - 793, - 799 - ], - "loc": { - "start": { - "line": 41, - "column": 1 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Folder", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "root", - "identifiers": [ - { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 70, - 74 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'folder'", - "value": "folder", - "range": [ - 76, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 9 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 70, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 3 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 89, - 93 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Important work stuff'", - "value": "Important work stuff", - "range": [ - 95, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 9 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - "range": [ - 89, - 117 - ], - "loc": { - "start": { - "line": 7, - "column": 3 - }, - "end": { - "line": 7, - "column": 31 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "files", - "range": [ - 122, - 127 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 8, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 137, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 143, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 12 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "range": [ - 137, - 149 - ], - "loc": { - "start": { - "line": 9, - "column": 6 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 151, - 155 - ], - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'quarterly-results.xlsx'", - "value": "quarterly-results.xlsx", - "range": [ - 157, - 181 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 50 - } - } - }, - "range": [ - 151, - 181 - ], - "loc": { - "start": { - "line": 9, - "column": 20 - }, - "end": { - "line": 9, - "column": 50 - } - } - } - ], - "range": [ - 135, - 183 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 52 - } - } - } - ], - "range": [ - 129, - 188 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 10, - "column": 4 - } - } - }, - "range": [ - 122, - 188 - ], - "loc": { - "start": { - "line": 8, - "column": 3 - }, - "end": { - "line": 10, - "column": 4 - } - } - } - ], - "range": [ - 65, - 192 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 201, - 205 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'folder'", - "value": "folder", - "range": [ - 207, - 215 - ], - "loc": { - "start": { - "line": 13, - "column": 9 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - "range": [ - 201, - 215 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 220, - 224 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 7 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Animal GIFs'", - "value": "Animal GIFs", - "range": [ - 226, - 239 - ], - "loc": { - "start": { - "line": 14, - "column": 9 - }, - "end": { - "line": 14, - "column": 22 - } - } - }, - "range": [ - 220, - 239 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 22 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "files", - "range": [ - 244, - 249 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 15, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 264, - 268 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'folder'", - "value": "folder", - "range": [ - 270, - 278 - ], - "loc": { - "start": { - "line": 17, - "column": 11 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - "range": [ - 264, - 278 - ], - "loc": { - "start": { - "line": 17, - "column": 5 - }, - "end": { - "line": 17, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 285, - 289 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Dogs'", - "value": "Dogs", - "range": [ - 291, - 297 - ], - "loc": { - "start": { - "line": 18, - "column": 11 - }, - "end": { - "line": 18, - "column": 17 - } - } - }, - "range": [ - 285, - 297 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 17 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "files", - "range": [ - 304, - 309 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 321, - 325 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 327, - 333 - ], - "loc": { - "start": { - "line": 20, - "column": 14 - }, - "end": { - "line": 20, - "column": 20 - } - } - }, - "range": [ - 321, - 333 - ], - "loc": { - "start": { - "line": 20, - "column": 8 - }, - "end": { - "line": 20, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 335, - 339 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 26 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'treadmill.gif'", - "value": "treadmill.gif", - "range": [ - 341, - 356 - ], - "loc": { - "start": { - "line": 20, - "column": 28 - }, - "end": { - "line": 20, - "column": 43 - } - } - }, - "range": [ - 335, - 356 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 43 - } - } - } - ], - "range": [ - 319, - 358 - ], - "loc": { - "start": { - "line": 20, - "column": 6 - }, - "end": { - "line": 20, - "column": 45 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 368, - 372 - ], - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 374, - 380 - ], - "loc": { - "start": { - "line": 21, - "column": 14 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - "range": [ - 368, - 380 - ], - "loc": { - "start": { - "line": 21, - "column": 8 - }, - "end": { - "line": 21, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 382, - 386 - ], - "loc": { - "start": { - "line": 21, - "column": 22 - }, - "end": { - "line": 21, - "column": 26 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'rope-jumping.gif'", - "value": "rope-jumping.gif", - "range": [ - 388, - 406 - ], - "loc": { - "start": { - "line": 21, - "column": 28 - }, - "end": { - "line": 21, - "column": 46 - } - } - }, - "range": [ - 382, - 406 - ], - "loc": { - "start": { - "line": 21, - "column": 22 - }, - "end": { - "line": 21, - "column": 46 - } - } - } - ], - "range": [ - 366, - 408 - ], - "loc": { - "start": { - "line": 21, - "column": 6 - }, - "end": { - "line": 21, - "column": 48 - } - } - } - ], - "range": [ - 311, - 415 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 22, - "column": 6 - } - } - }, - "range": [ - 304, - 415 - ], - "loc": { - "start": { - "line": 19, - "column": 5 - }, - "end": { - "line": 22, - "column": 6 - } - } - } - ], - "range": [ - 257, - 421 - ], - "loc": { - "start": { - "line": 16, - "column": 4 - }, - "end": { - "line": 23, - "column": 5 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 434, - 438 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'folder'", - "value": "folder", - "range": [ - 440, - 448 - ], - "loc": { - "start": { - "line": 25, - "column": 11 - }, - "end": { - "line": 25, - "column": 19 - } - } - }, - "range": [ - 434, - 448 - ], - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 455, - 459 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'Goats'", - "value": "Goats", - "range": [ - 461, - 468 - ], - "loc": { - "start": { - "line": 26, - "column": 11 - }, - "end": { - "line": 26, - "column": 18 - } - } - }, - "range": [ - 455, - 468 - ], - "loc": { - "start": { - "line": 26, - "column": 5 - }, - "end": { - "line": 26, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "files", - "range": [ - 475, - 480 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 27, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 492, - 496 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 498, - 504 - ], - "loc": { - "start": { - "line": 28, - "column": 14 - }, - "end": { - "line": 28, - "column": 20 - } - } - }, - "range": [ - 492, - 504 - ], - "loc": { - "start": { - "line": 28, - "column": 8 - }, - "end": { - "line": 28, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 506, - 510 - ], - "loc": { - "start": { - "line": 28, - "column": 22 - }, - "end": { - "line": 28, - "column": 26 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'parkour.gif'", - "value": "parkour.gif", - "range": [ - 512, - 525 - ], - "loc": { - "start": { - "line": 28, - "column": 28 - }, - "end": { - "line": 28, - "column": 41 - } - } - }, - "range": [ - 506, - 525 - ], - "loc": { - "start": { - "line": 28, - "column": 22 - }, - "end": { - "line": 28, - "column": 41 - } - } - } - ], - "range": [ - 490, - 527 - ], - "loc": { - "start": { - "line": 28, - "column": 6 - }, - "end": { - "line": 28, - "column": 43 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 537, - 541 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 543, - 549 - ], - "loc": { - "start": { - "line": 29, - "column": 14 - }, - "end": { - "line": 29, - "column": 20 - } - } - }, - "range": [ - 537, - 549 - ], - "loc": { - "start": { - "line": 29, - "column": 8 - }, - "end": { - "line": 29, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 551, - 555 - ], - "loc": { - "start": { - "line": 29, - "column": 22 - }, - "end": { - "line": 29, - "column": 26 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'rampage.gif'", - "value": "rampage.gif", - "range": [ - 557, - 570 - ], - "loc": { - "start": { - "line": 29, - "column": 28 - }, - "end": { - "line": 29, - "column": 41 - } - } - }, - "range": [ - 551, - 570 - ], - "loc": { - "start": { - "line": 29, - "column": 22 - }, - "end": { - "line": 29, - "column": 41 - } - } - } - ], - "range": [ - 535, - 572 - ], - "loc": { - "start": { - "line": 29, - "column": 6 - }, - "end": { - "line": 29, - "column": 43 - } - } - } - ], - "range": [ - 482, - 579 - ], - "loc": { - "start": { - "line": 27, - "column": 12 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - "range": [ - 475, - 579 - ], - "loc": { - "start": { - "line": 27, - "column": 5 - }, - "end": { - "line": 30, - "column": 6 - } - } - } - ], - "range": [ - 427, - 585 - ], - "loc": { - "start": { - "line": 24, - "column": 4 - }, - "end": { - "line": 31, - "column": 5 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 32, - "column": 6 - }, - "end": { - "line": 32, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 599, - 605 - ], - "loc": { - "start": { - "line": 32, - "column": 12 - }, - "end": { - "line": 32, - "column": 18 - } - } - }, - "range": [ - 593, - 605 - ], - "loc": { - "start": { - "line": 32, - "column": 6 - }, - "end": { - "line": 32, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 607, - 611 - ], - "loc": { - "start": { - "line": 32, - "column": 20 - }, - "end": { - "line": 32, - "column": 24 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'cat-roomba.gif'", - "value": "cat-roomba.gif", - "range": [ - 613, - 629 - ], - "loc": { - "start": { - "line": 32, - "column": 26 - }, - "end": { - "line": 32, - "column": 42 - } - } - }, - "range": [ - 607, - 629 - ], - "loc": { - "start": { - "line": 32, - "column": 20 - }, - "end": { - "line": 32, - "column": 42 - } - } - } - ], - "range": [ - 591, - 631 - ], - "loc": { - "start": { - "line": 32, - "column": 4 - }, - "end": { - "line": 32, - "column": 44 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 639, - 643 - ], - "loc": { - "start": { - "line": 33, - "column": 6 - }, - "end": { - "line": 33, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 645, - 651 - ], - "loc": { - "start": { - "line": 33, - "column": 12 - }, - "end": { - "line": 33, - "column": 18 - } - } - }, - "range": [ - 639, - 651 - ], - "loc": { - "start": { - "line": 33, - "column": 6 - }, - "end": { - "line": 33, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 653, - 657 - ], - "loc": { - "start": { - "line": 33, - "column": 20 - }, - "end": { - "line": 33, - "column": 24 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'duck-shuffle.gif'", - "value": "duck-shuffle.gif", - "range": [ - 659, - 677 - ], - "loc": { - "start": { - "line": 33, - "column": 26 - }, - "end": { - "line": 33, - "column": 44 - } - } - }, - "range": [ - 653, - 677 - ], - "loc": { - "start": { - "line": 33, - "column": 20 - }, - "end": { - "line": 33, - "column": 44 - } - } - } - ], - "range": [ - 637, - 679 - ], - "loc": { - "start": { - "line": 33, - "column": 4 - }, - "end": { - "line": 33, - "column": 46 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 687, - 691 - ], - "loc": { - "start": { - "line": 34, - "column": 6 - }, - "end": { - "line": 34, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 693, - 699 - ], - "loc": { - "start": { - "line": 34, - "column": 12 - }, - "end": { - "line": 34, - "column": 18 - } - } - }, - "range": [ - 687, - 699 - ], - "loc": { - "start": { - "line": 34, - "column": 6 - }, - "end": { - "line": 34, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 701, - 705 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 34, - "column": 24 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'monkey-on-a-pig.gif'", - "value": "monkey-on-a-pig.gif", - "range": [ - 707, - 728 - ], - "loc": { - "start": { - "line": 34, - "column": 26 - }, - "end": { - "line": 34, - "column": 47 - } - } - }, - "range": [ - 701, - 728 - ], - "loc": { - "start": { - "line": 34, - "column": 20 - }, - "end": { - "line": 34, - "column": 47 - } - } - } - ], - "range": [ - 685, - 730 - ], - "loc": { - "start": { - "line": 34, - "column": 4 - }, - "end": { - "line": 34, - "column": 49 - } - } - } - ], - "range": [ - 251, - 735 - ], - "loc": { - "start": { - "line": 15, - "column": 10 - }, - "end": { - "line": 35, - "column": 4 - } - } - }, - "range": [ - 244, - 735 - ], - "loc": { - "start": { - "line": 15, - "column": 3 - }, - "end": { - "line": 35, - "column": 4 - } - } - } - ], - "range": [ - 196, - 739 - ], - "loc": { - "start": { - "line": 12, - "column": 2 - }, - "end": { - "line": 36, - "column": 3 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "type", - "range": [ - 745, - 749 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'file'", - "value": "file", - "range": [ - 751, - 757 - ], - "loc": { - "start": { - "line": 37, - "column": 10 - }, - "end": { - "line": 37, - "column": 16 - } - } - }, - "range": [ - 745, - 757 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "name", - "range": [ - 759, - 763 - ], - "loc": { - "start": { - "line": 37, - "column": 18 - }, - "end": { - "line": 37, - "column": 22 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'TODO.md'", - "value": "TODO.md", - "range": [ - 765, - 774 - ], - "loc": { - "start": { - "line": 37, - "column": 24 - }, - "end": { - "line": 37, - "column": 33 - } - } - }, - "range": [ - 759, - 774 - ], - "loc": { - "start": { - "line": 37, - "column": 18 - }, - "end": { - "line": 37, - "column": 33 - } - } - } - ], - "range": [ - 743, - 776 - ], - "loc": { - "start": { - "line": 37, - "column": 2 - }, - "end": { - "line": 37, - "column": 35 - } - } - } - ], - "range": [ - 61, - 779 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 38, - "column": 2 - } - } - }, - "range": [ - 54, - 779 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 38, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "root", - "range": [ - 819, - 823 - ], - "loc": { - "start": { - "line": 41, - "column": 27 - }, - "end": { - "line": 41, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "root", - "range": [ - 819, - 823 - ], - "loc": { - "start": { - "line": 41, - "column": 27 - }, - "end": { - "line": 41, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "root", - "range": [ - 54, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Folder", - "range": [ - 793, - 799 - ], - "loc": { - "start": { - "line": 41, - "column": 1 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Folder", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json index c05d8eca..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,792 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "init": null, - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 38, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 49, - 53 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 14, - "column": 64 - }, - "end": { - "line": 14, - "column": 68 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ] - }, - { - "name": "type", - "identifiers": [ - { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "'.'", - "value": ".", - "range": [ - 66, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 39 - }, - "end": { - "line": 3, - "column": 42 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "name", - "range": [ - 49, - 53 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "lastIndexOf", - "range": [ - 54, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 27 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "range": [ - 49, - 65 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 38 - } - } - }, - "optional": false, - "range": [ - 49, - 70 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 43 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 73, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 46 - }, - "end": { - "line": 3, - "column": 47 - } - } - }, - "range": [ - 49, - 74 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 47 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "name", - "range": [ - 38, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 43, - 48 - ], - "loc": { - "start": { - "line": 3, - "column": 16 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "range": [ - 38, - 48 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 21 - } - } - }, - "optional": false, - "range": [ - 38, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 48 - } - } - }, - "range": [ - 31, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 48 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "type", - "range": [ - 253, - 257 - ], - "loc": { - "start": { - "line": 14, - "column": 51 - }, - "end": { - "line": 14, - "column": 55 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 38, - 42 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 49, - 53 - ], - "loc": { - "start": { - "line": 3, - "column": 22 - }, - "end": { - "line": 3, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "type", - "range": [ - 253, - 257 - ], - "loc": { - "start": { - "line": 14, - "column": 51 - }, - "end": { - "line": 14, - "column": 55 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "type", - "range": [ - 31, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 4 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 14, - "column": 64 - }, - "end": { - "line": 14, - "column": 68 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 21, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json index 3f9cee0a..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2557 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "File", - "identifiers": [ - { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "File", - "range": [ - 761, - 765 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "expanded", - "identifiers": [ - { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 68, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 23 - }, - "end": { - "line": 4, - "column": 28 - } - } - }, - "range": [ - 57, - 73 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 28 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 136, - 144 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 148, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 14 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 585, - 593 - ], - "loc": { - "start": { - "line": 38, - "column": 12 - }, - "end": { - "line": 38, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 632, - 640 - ], - "loc": { - "start": { - "line": 40, - "column": 5 - }, - "end": { - "line": 40, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - }, - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "init": null, - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 613, - 617 - ], - "loc": { - "start": { - "line": 38, - "column": 40 - }, - "end": { - "line": 38, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ] - }, - { - "name": "files", - "identifiers": [ - { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "init": null, - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 657, - 662 - ], - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 42, - "column": 14 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - } - ] - }, - { - "name": "toggle", - "identifiers": [ - { - "type": "Identifier", - "name": "toggle", - "range": [ - 123, - 129 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "toggle", - "range": [ - 123, - 129 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "expanded", - "range": [ - 136, - 144 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "operator": "=", - "right": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "expanded", - "range": [ - 148, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 14 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 147, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 13 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "range": [ - 136, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "range": [ - 136, - 157 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 23 - } - } - } - ], - "range": [ - 132, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 19 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "toggle", - "range": [ - 123, - 129 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - "params": [], - "range": [ - 114, - 160 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 604, - 610 - ], - "loc": { - "start": { - "line": 38, - "column": 31 - }, - "end": { - "line": 38, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 123, - 129 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 585, - 593 - ], - "loc": { - "start": { - "line": 38, - "column": 12 - }, - "end": { - "line": 38, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "toggle", - "range": [ - 604, - 610 - ], - "loc": { - "start": { - "line": 38, - "column": 31 - }, - "end": { - "line": 38, - "column": 37 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "toggle", - "range": [ - 123, - 129 - ], - "loc": { - "start": { - "line": 8, - "column": 10 - }, - "end": { - "line": 8, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 613, - 617 - ], - "loc": { - "start": { - "line": 38, - "column": 40 - }, - "end": { - "line": 38, - "column": 44 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 87, - 91 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 632, - 640 - ], - "loc": { - "start": { - "line": 40, - "column": 5 - }, - "end": { - "line": 40, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 136, - 144 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 148, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 14 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 136, - 144 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 10 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "expanded", - "range": [ - 148, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 14 - }, - "end": { - "line": 9, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "expanded", - "range": [ - 57, - 65 - ], - "loc": { - "start": { - "line": 4, - "column": 12 - }, - "end": { - "line": 4, - "column": 20 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 657, - 662 - ], - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 42, - "column": 14 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "file", - "identifiers": [ - { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "files", - "range": [ - 657, - 662 - ], - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 42, - "column": 14 - } - } - }, - "context": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "li", - "range": [ - 676, - 678 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 6 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 675, - 679 - ], - "loc": { - "start": { - "line": 43, - "column": 3 - }, - "end": { - "line": 43, - "column": 7 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 679, - 684 - ], - "loc": { - "start": { - "line": 43, - "column": 7 - }, - "end": { - "line": 44, - "column": 4 - } - } - }, - { - "type": "SvelteIfBlock", - "elseif": false, - "expression": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "file", - "range": [ - 689, - 693 - ], - "loc": { - "start": { - "line": 44, - "column": 9 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "type", - "range": [ - 694, - 698 - ], - "loc": { - "start": { - "line": 44, - "column": 14 - }, - "end": { - "line": 44, - "column": 18 - } - } - }, - "range": [ - 689, - 698 - ], - "loc": { - "start": { - "line": 44, - "column": 9 - }, - "end": { - "line": 44, - "column": 18 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'folder'", - "value": "folder", - "range": [ - 703, - 711 - ], - "loc": { - "start": { - "line": 44, - "column": 23 - }, - "end": { - "line": 44, - "column": 31 - } - } - }, - "range": [ - 689, - 711 - ], - "loc": { - "start": { - "line": 44, - "column": 9 - }, - "end": { - "line": 44, - "column": 31 - } - } - }, - "children": [ - { - "type": "SvelteElement", - "kind": "special", - "name": { - "type": "SvelteName", - "name": "svelte:self", - "range": [ - 719, - 730 - ], - "loc": { - "start": { - "line": 45, - "column": 6 - }, - "end": { - "line": 45, - "column": 17 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteSpreadAttribute", - "argument": { - "type": "Identifier", - "name": "file", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 45, - "column": 22 - }, - "end": { - "line": 45, - "column": 26 - } - } - }, - "range": [ - 731, - 740 - ], - "loc": { - "start": { - "line": 45, - "column": 18 - }, - "end": { - "line": 45, - "column": 27 - } - } - } - ], - "selfClosing": true, - "range": [ - 718, - 742 - ], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 29 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 718, - 742 - ], - "loc": { - "start": { - "line": 45, - "column": 5 - }, - "end": { - "line": 45, - "column": 29 - } - } - } - ], - "else": { - "type": "SvelteElseBlock", - "elseif": false, - "children": [ - { - "type": "SvelteElement", - "kind": "component", - "name": { - "type": "Identifier", - "name": "File", - "range": [ - 761, - 765 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 10 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteSpreadAttribute", - "argument": { - "type": "Identifier", - "name": "file", - "range": [ - 770, - 774 - ], - "loc": { - "start": { - "line": 47, - "column": 15 - }, - "end": { - "line": 47, - "column": 19 - } - } - }, - "range": [ - 766, - 775 - ], - "loc": { - "start": { - "line": 47, - "column": 11 - }, - "end": { - "line": 47, - "column": 20 - } - } - } - ], - "selfClosing": true, - "range": [ - 760, - 777 - ], - "loc": { - "start": { - "line": 47, - "column": 5 - }, - "end": { - "line": 47, - "column": 22 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 760, - 777 - ], - "loc": { - "start": { - "line": 47, - "column": 5 - }, - "end": { - "line": 47, - "column": 22 - } - } - } - ], - "range": [ - 747, - 782 - ], - "loc": { - "start": { - "line": 46, - "column": 4 - }, - "end": { - "line": 48, - "column": 4 - } - } - }, - "range": [ - 684, - 787 - ], - "loc": { - "start": { - "line": 44, - "column": 4 - }, - "end": { - "line": 48, - "column": 9 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 787, - 791 - ], - "loc": { - "start": { - "line": 48, - "column": 9 - }, - "end": { - "line": 49, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 791, - 796 - ], - "loc": { - "start": { - "line": 49, - "column": 3 - }, - "end": { - "line": 49, - "column": 8 - } - } - }, - "range": [ - 675, - 796 - ], - "loc": { - "start": { - "line": 43, - "column": 3 - }, - "end": { - "line": 49, - "column": 8 - } - } - } - ], - "else": null, - "range": [ - 650, - 806 - ], - "loc": { - "start": { - "line": 42, - "column": 2 - }, - "end": { - "line": 50, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 689, - 693 - ], - "loc": { - "start": { - "line": 44, - "column": 9 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 45, - "column": 22 - }, - "end": { - "line": 45, - "column": 26 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 770, - 774 - ], - "loc": { - "start": { - "line": 47, - "column": 15 - }, - "end": { - "line": 47, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 689, - 693 - ], - "loc": { - "start": { - "line": 44, - "column": 9 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 45, - "column": 22 - }, - "end": { - "line": 45, - "column": 26 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 735, - 739 - ], - "loc": { - "start": { - "line": 45, - "column": 22 - }, - "end": { - "line": 45, - "column": 26 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 770, - 774 - ], - "loc": { - "start": { - "line": 47, - "column": 15 - }, - "end": { - "line": 47, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "File", - "range": [ - 761, - 765 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "file", - "range": [ - 770, - 774 - ], - "loc": { - "start": { - "line": 47, - "column": 15 - }, - "end": { - "line": 47, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "file", - "range": [ - 666, - 670 - ], - "loc": { - "start": { - "line": 42, - "column": 18 - }, - "end": { - "line": 42, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "File", - "range": [ - 761, - 765 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "File", - "range": [ - 761, - 765 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "files", - "range": [ - 657, - 662 - ], - "loc": { - "start": { - "line": 42, - "column": 9 - }, - "end": { - "line": 42, - "column": 14 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "files", - "range": [ - 105, - 110 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "File", - "range": [ - 761, - 765 - ], - "loc": { - "start": { - "line": 47, - "column": 6 - }, - "end": { - "line": 47, - "column": 10 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "File", - "range": [ - 17, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json index f152a4e2..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1978 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "layers", - "identifiers": [ - { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 26, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 17 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 29, - 30 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 21 - } - } - }, - { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 32, - 33 - ], - "loc": { - "start": { - "line": 2, - "column": 23 - }, - "end": { - "line": 2, - "column": 24 - } - } - }, - { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 35, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 38, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 29 - }, - "end": { - "line": 2, - "column": 30 - } - } - }, - { - "type": "Literal", - "raw": "5", - "value": 5, - "range": [ - 41, - 42 - ], - "loc": { - "start": { - "line": 2, - "column": 32 - }, - "end": { - "line": 2, - "column": 33 - } - } - }, - { - "type": "Literal", - "raw": "6", - "value": 6, - "range": [ - 44, - 45 - ], - "loc": { - "start": { - "line": 2, - "column": 35 - }, - "end": { - "line": 2, - "column": 36 - } - } - }, - { - "type": "Literal", - "raw": "7", - "value": 7, - "range": [ - 47, - 48 - ], - "loc": { - "start": { - "line": 2, - "column": 38 - }, - "end": { - "line": 2, - "column": 39 - } - } - }, - { - "type": "Literal", - "raw": "8", - "value": 8, - "range": [ - 50, - 51 - ], - "loc": { - "start": { - "line": 2, - "column": 41 - }, - "end": { - "line": 2, - "column": 42 - } - } - } - ], - "range": [ - 25, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 43 - } - } - }, - "range": [ - 16, - 52 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 43 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 257, - 263 - ], - "loc": { - "start": { - "line": 12, - "column": 48 - }, - "end": { - "line": 12, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "y", - "identifiers": [ - { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - "init": null, - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 244, - 245 - ], - "loc": { - "start": { - "line": 12, - "column": 35 - }, - "end": { - "line": 12, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 466, - 467 - ], - "loc": { - "start": { - "line": 20, - "column": 40 - }, - "end": { - "line": 20, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 548, - 549 - ], - "loc": { - "start": { - "line": 25, - "column": 21 - }, - "end": { - "line": 25, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 103, - 104 - ], - "loc": { - "start": { - "line": 7, - "column": 29 - }, - "end": { - "line": 7, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 454, - 458 - ], - "loc": { - "start": { - "line": 20, - "column": 28 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 466, - 467 - ], - "loc": { - "start": { - "line": 20, - "column": 40 - }, - "end": { - "line": 20, - "column": 41 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 548, - 549 - ], - "loc": { - "start": { - "line": 25, - "column": 21 - }, - "end": { - "line": 25, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "layer", - "identifiers": [ - { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "layers", - "range": [ - 185, - 191 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 14 - } - } - }, - "context": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "img", - "range": [ - 205, - 208 - ], - "loc": { - "start": { - "line": 11, - "column": 3 - }, - "end": { - "line": 11, - "column": 6 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "style", - "range": [ - 212, - 217 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 8 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "transform: translate(0,", - "range": [ - 219, - 242 - ], - "loc": { - "start": { - "line": 12, - "column": 10 - }, - "end": { - "line": 12, - "column": 33 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "y", - "range": [ - 244, - 245 - ], - "loc": { - "start": { - "line": 12, - "column": 35 - }, - "end": { - "line": 12, - "column": 36 - } - } - }, - "operator": "-", - "prefix": true, - "range": [ - 243, - 245 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 36 - } - } - }, - "operator": "*", - "right": { - "type": "Identifier", - "name": "layer", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "range": [ - 243, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "operator": "/", - "right": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "layers", - "range": [ - 257, - 263 - ], - "loc": { - "start": { - "line": 12, - "column": 48 - }, - "end": { - "line": 12, - "column": 54 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 264, - 270 - ], - "loc": { - "start": { - "line": 12, - "column": 55 - }, - "end": { - "line": 12, - "column": 61 - } - } - }, - "range": [ - 257, - 270 - ], - "loc": { - "start": { - "line": 12, - "column": 48 - }, - "end": { - "line": 12, - "column": 61 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 273, - 274 - ], - "loc": { - "start": { - "line": 12, - "column": 64 - }, - "end": { - "line": 12, - "column": 65 - } - } - }, - "range": [ - 257, - 274 - ], - "loc": { - "start": { - "line": 12, - "column": 48 - }, - "end": { - "line": 12, - "column": 65 - } - } - }, - "range": [ - 243, - 275 - ], - "loc": { - "start": { - "line": 12, - "column": 34 - }, - "end": { - "line": 12, - "column": 66 - } - } - }, - "range": [ - 242, - 276 - ], - "loc": { - "start": { - "line": 12, - "column": 33 - }, - "end": { - "line": 12, - "column": 67 - } - } - }, - { - "type": "SvelteLiteral", - "value": "px)", - "range": [ - 276, - 279 - ], - "loc": { - "start": { - "line": 12, - "column": 67 - }, - "end": { - "line": 12, - "column": 70 - } - } - } - ], - "range": [ - 212, - 280 - ], - "loc": { - "start": { - "line": 12, - "column": 3 - }, - "end": { - "line": 12, - "column": 71 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "src", - "range": [ - 284, - 287 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 6 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "https://www.firewatchgame.com/images/parallax/parallax", - "range": [ - 289, - 343 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 62 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "layer", - "range": [ - 344, - 349 - ], - "loc": { - "start": { - "line": 13, - "column": 63 - }, - "end": { - "line": 13, - "column": 68 - } - } - }, - "range": [ - 343, - 350 - ], - "loc": { - "start": { - "line": 13, - "column": 62 - }, - "end": { - "line": 13, - "column": 69 - } - } - }, - { - "type": "SvelteLiteral", - "value": ".png", - "range": [ - 350, - 354 - ], - "loc": { - "start": { - "line": 13, - "column": 69 - }, - "end": { - "line": 13, - "column": 73 - } - } - } - ], - "range": [ - 284, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 3 - }, - "end": { - "line": 13, - "column": 74 - } - } - }, - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "alt", - "range": [ - 359, - 362 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 6 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteLiteral", - "value": "parallax layer ", - "range": [ - 364, - 379 - ], - "loc": { - "start": { - "line": 14, - "column": 8 - }, - "end": { - "line": 14, - "column": 23 - } - } - }, - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "Identifier", - "name": "layer", - "range": [ - 380, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "range": [ - 379, - 386 - ], - "loc": { - "start": { - "line": 14, - "column": 23 - }, - "end": { - "line": 14, - "column": 30 - } - } - } - ], - "range": [ - 359, - 387 - ], - "loc": { - "start": { - "line": 14, - "column": 3 - }, - "end": { - "line": 14, - "column": 31 - } - } - } - ], - "selfClosing": false, - "range": [ - 204, - 391 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 15, - "column": 3 - } - } - }, - "children": [], - "endTag": null, - "range": [ - 204, - 391 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 15, - "column": 3 - } - } - } - ], - "else": null, - "range": [ - 178, - 400 - ], - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 16, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "layer", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layer", - "range": [ - 344, - 349 - ], - "loc": { - "start": { - "line": 13, - "column": 63 - }, - "end": { - "line": 13, - "column": 68 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layer", - "range": [ - 380, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 244, - 245 - ], - "loc": { - "start": { - "line": 12, - "column": 35 - }, - "end": { - "line": 12, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layer", - "range": [ - 248, - 253 - ], - "loc": { - "start": { - "line": 12, - "column": 39 - }, - "end": { - "line": 12, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 257, - 263 - ], - "loc": { - "start": { - "line": 12, - "column": 48 - }, - "end": { - "line": 12, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layer", - "range": [ - 344, - 349 - ], - "loc": { - "start": { - "line": 13, - "column": 63 - }, - "end": { - "line": 13, - "column": 68 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layer", - "range": [ - 380, - 385 - ], - "loc": { - "start": { - "line": 14, - "column": 24 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layer", - "range": [ - 195, - 200 - ], - "loc": { - "start": { - "line": 10, - "column": 18 - }, - "end": { - "line": 10, - "column": 23 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "y", - "range": [ - 244, - 245 - ], - "loc": { - "start": { - "line": 12, - "column": 35 - }, - "end": { - "line": 12, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "y", - "range": [ - 60, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 6 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "layers", - "range": [ - 257, - 263 - ], - "loc": { - "start": { - "line": 12, - "column": 48 - }, - "end": { - "line": 12, - "column": 54 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "layers", - "range": [ - 16, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 454, - 458 - ], - "loc": { - "start": { - "line": 20, - "column": 28 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 454, - 458 - ], - "loc": { - "start": { - "line": 20, - "column": 28 - }, - "end": { - "line": 20, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json index ee2640d0..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1821 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "key", - "identifiers": [ - { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": null, - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 646, - 649 - ], - "loc": { - "start": { - "line": 36, - "column": 6 - }, - "end": { - "line": 36, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 659, - 662 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 683, - 686 - ], - "loc": { - "start": { - "line": 37, - "column": 32 - }, - "end": { - "line": 37, - "column": 35 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - }, - { - "name": "keyCode", - "identifiers": [ - { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": null, - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 700, - 707 - ], - "loc": { - "start": { - "line": 38, - "column": 6 - }, - "end": { - "line": 38, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - }, - { - "name": "handleKeydown", - "identifiers": [ - { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 44, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 44, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "key", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 81, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 69, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 69, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 98, - 111 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 88, - 111 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 88, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 44, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - ], - "range": [ - 35, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 589, - 602 - ], - "loc": { - "start": { - "line": 33, - "column": 27 - }, - "end": { - "line": 33, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 44, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 589, - 602 - ], - "loc": { - "start": { - "line": 33, - "column": 27 - }, - "end": { - "line": 33, - "column": 40 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 44, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 23 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 646, - 649 - ], - "loc": { - "start": { - "line": 36, - "column": 6 - }, - "end": { - "line": 36, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "key", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 81, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 14 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 75, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 69, - 84 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 17 - } - } - }, - "range": [ - 69, - 85 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 18 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 104, - 111 - ], - "loc": { - "start": { - "line": 7, - "column": 18 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 98, - 111 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 88, - 111 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 25 - } - } - }, - "range": [ - 88, - 112 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 26 - } - } - } - ], - "range": [ - 65, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 31 - }, - "end": { - "line": 8, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 44, - 57 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - ], - "range": [ - 35, - 115 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 75, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 8 - }, - "end": { - "line": 6, - "column": 13 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 98, - 103 - ], - "loc": { - "start": { - "line": 7, - "column": 12 - }, - "end": { - "line": 7, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 5 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 88, - 95 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 659, - 662 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 683, - 686 - ], - "loc": { - "start": { - "line": 37, - "column": 32 - }, - "end": { - "line": 37, - "column": 35 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 700, - 707 - ], - "loc": { - "start": { - "line": 38, - "column": 6 - }, - "end": { - "line": 38, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 659, - 662 - ], - "loc": { - "start": { - "line": 37, - "column": 8 - }, - "end": { - "line": 37, - "column": 11 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "key", - "range": [ - 683, - 686 - ], - "loc": { - "start": { - "line": 37, - "column": 32 - }, - "end": { - "line": 37, - "column": 35 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "key", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 700, - 707 - ], - "loc": { - "start": { - "line": 38, - "column": 6 - }, - "end": { - "line": 38, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "keyCode", - "range": [ - 24, - 31 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - }, - { - "type": "block", - "variables": [], - "references": [], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json index c3606b93..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,360 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'world'", - "value": "world", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 14, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 60, - 64 - ], - "loc": { - "start": { - "line": 5, - "column": 19 - }, - "end": { - "line": 5, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 79, - 83 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json index b5e413cd..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,360 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "name", - "identifiers": [ - { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "init": { - "type": "Literal", - "raw": "'world'", - "value": "world", - "range": [ - 21, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 12 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "range": [ - 14, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 55, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 74, - 78 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 55, - 59 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "name", - "range": [ - 74, - 78 - ], - "loc": { - "start": { - "line": 7, - "column": 11 - }, - "end": { - "line": 7, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "name", - "range": [ - 14, - 18 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 9 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json index 9d188d72..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,546 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "marked", - "identifiers": [ - { - "type": "Identifier", - "name": "marked", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "marked", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "marked", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "marked", - "range": [ - 210, - 216 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "marked", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "init": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "Some words are *italic*, some are **bold**", - "raw": "Some words are *italic*, some are **bold**" - }, - "range": [ - 52, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 57 - } - } - } - ], - "range": [ - 52, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 57 - } - } - }, - "range": [ - 44, - 96 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 57 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 184, - 189 - ], - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 217, - 222 - ], - "loc": { - "start": { - "line": 12, - "column": 14 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 184, - 189 - ], - "loc": { - "start": { - "line": 10, - "column": 15 - }, - "end": { - "line": 10, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "marked", - "range": [ - 210, - 216 - ], - "loc": { - "start": { - "line": 12, - "column": 7 - }, - "end": { - "line": 12, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "marked", - "range": [ - 17, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 217, - 222 - ], - "loc": { - "start": { - "line": 12, - "column": 14 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 44, - 49 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 10 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json index ac4bbc96..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,7035 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "tick", - "identifiers": [ - { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tick", - "range": [ - 609, - 613 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "init": { - "type": "TemplateLiteral", - "expressions": [], - "quasis": [ - { - "type": "TemplateElement", - "tail": true, - "value": { - "cooked": "Select some text and hit the tab key to toggle uppercase", - "raw": "Select some text and hit the tab key to toggle uppercase" - }, - "range": [ - 53, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 70 - } - } - } - ], - "range": [ - 53, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 12 - }, - "end": { - "line": 3, - "column": 70 - } - } - }, - "range": [ - 46, - 111 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 70 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 444, - 448 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 789, - 793 - ], - "loc": { - "start": { - "line": 37, - "column": 17 - }, - "end": { - "line": 37, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - } - ] - }, - { - "name": "handleKeydown", - "identifiers": [ - { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 130, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 130, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": true, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 180, - 187 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "range": [ - 159, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "operator": "!==", - "right": { - "type": "Literal", - "raw": "'Tab'", - "value": "Tab", - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 159, - 178 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 155, - 187 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 191, - 196 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "preventDefault", - "range": [ - 197, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 22 - } - } - }, - "range": [ - 191, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 191, - 213 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "range": [ - 191, - 214 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - ], - "range": [ - 224, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "init": { - "type": "ThisExpression", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 54 - } - } - }, - "range": [ - 224, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 54 - } - } - } - ], - "range": [ - 218, - 271 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 55 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 304, - 318 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 46 - } - } - }, - { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 320, - 332 - ], - "loc": { - "start": { - "line": 11, - "column": 48 - }, - "end": { - "line": 11, - "column": 60 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 292, - 297 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 298, - 303 - ], - "loc": { - "start": { - "line": 11, - "column": 26 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 292, - 303 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 292, - 333 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 61 - } - } - }, - "range": [ - 280, - 333 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 61 - } - } - } - ], - "range": [ - 274, - 334 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 62 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selection", - "range": [ - 416, - 425 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toLowerCase", - "range": [ - 426, - 437 - ], - "loc": { - "start": { - "line": 15, - "column": 15 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "range": [ - 416, - 437 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 416, - 439 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "consequent": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selection", - "range": [ - 387, - 396 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toUpperCase", - "range": [ - 397, - 408 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "range": [ - 387, - 408 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 387, - 410 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 28 - } - } - }, - "test": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selection", - "range": [ - 371, - 380 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 44 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Literal", - "raw": "/[a-z]/", - "regex": { - "flags": "", - "pattern": "[a-z]" - }, - "value": "/[a-z]/", - "range": [ - 358, - 365 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "test", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 30 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 358, - 381 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 45 - } - } - }, - "range": [ - 358, - 439 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "range": [ - 344, - 439 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 15, - "column": 28 - } - } - } - ], - "range": [ - 338, - 440 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 15, - "column": 29 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "text", - "range": [ - 444, - 448 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 468, - 469 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 471, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 32 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 462, - 467 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - }, - "range": [ - 456, - 467 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 456, - 486 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "replacement", - "range": [ - 492, - 503 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 14 - } - } - }, - "range": [ - 456, - 503 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 19, - "column": 14 - } - } - }, - "operator": "+", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 521, - 533 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 509, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 515, - 520 - ], - "loc": { - "start": { - "line": 20, - "column": 9 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "range": [ - 509, - 520 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 509, - 534 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 456, - 534 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 444, - 538 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 444, - 539 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "tick", - "range": [ - 609, - 613 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 609, - 615 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 14 - } - } - }, - "range": [ - 603, - 615 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 14 - } - } - }, - "range": [ - 603, - 616 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 619, - 623 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 624, - 638 - ], - "loc": { - "start": { - "line": 25, - "column": 7 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "range": [ - 619, - 638 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 641, - 655 - ], - "loc": { - "start": { - "line": 25, - "column": 24 - }, - "end": { - "line": 25, - "column": 38 - } - } - }, - "range": [ - 619, - 655 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 38 - } - } - }, - "range": [ - 619, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 39 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 659, - 663 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 664, - 676 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "range": [ - 659, - 676 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 679, - 691 - ], - "loc": { - "start": { - "line": 26, - "column": 22 - }, - "end": { - "line": 26, - "column": 34 - } - } - }, - "range": [ - 659, - 691 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 34 - } - } - }, - "range": [ - 659, - 692 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 35 - } - } - } - ], - "range": [ - 151, - 695 - ], - "loc": { - "start": { - "line": 5, - "column": 37 - }, - "end": { - "line": 27, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 130, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - ], - "range": [ - 115, - 695 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 27, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 807, - 820 - ], - "loc": { - "start": { - "line": 37, - "column": 35 - }, - "end": { - "line": 37, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 130, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 789, - 793 - ], - "loc": { - "start": { - "line": 37, - "column": 17 - }, - "end": { - "line": 37, - "column": 21 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 807, - 820 - ], - "loc": { - "start": { - "line": 37, - "column": 35 - }, - "end": { - "line": 37, - "column": 48 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 130, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 29 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": true, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 180, - 187 - ], - "loc": { - "start": { - "line": 6, - "column": 27 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 165, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "range": [ - 159, - 168 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "operator": "!==", - "right": { - "type": "Literal", - "raw": "'Tab'", - "value": "Tab", - "range": [ - 173, - 178 - ], - "loc": { - "start": { - "line": 6, - "column": 20 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 159, - 178 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 25 - } - } - }, - "range": [ - 155, - 187 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 34 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 191, - 196 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "preventDefault", - "range": [ - 197, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 8 - }, - "end": { - "line": 8, - "column": 22 - } - } - }, - "range": [ - 191, - 211 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 22 - } - } - }, - "optional": false, - "range": [ - 191, - 213 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 24 - } - } - }, - "range": [ - 191, - 214 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 25 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - ], - "range": [ - 224, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "init": { - "type": "ThisExpression", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 54 - } - } - }, - "range": [ - 224, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 54 - } - } - } - ], - "range": [ - 218, - 271 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 55 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 304, - 318 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 46 - } - } - }, - { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 320, - 332 - ], - "loc": { - "start": { - "line": 11, - "column": 48 - }, - "end": { - "line": 11, - "column": 60 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 292, - 297 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 298, - 303 - ], - "loc": { - "start": { - "line": 11, - "column": 26 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 292, - 303 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 292, - 333 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 61 - } - } - }, - "range": [ - 280, - 333 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 61 - } - } - } - ], - "range": [ - 274, - 334 - ], - "loc": { - "start": { - "line": 11, - "column": 2 - }, - "end": { - "line": 11, - "column": 62 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selection", - "range": [ - 416, - 425 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toLowerCase", - "range": [ - 426, - 437 - ], - "loc": { - "start": { - "line": 15, - "column": 15 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "range": [ - 416, - 437 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 416, - 439 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "consequent": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selection", - "range": [ - 387, - 396 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toUpperCase", - "range": [ - 397, - 408 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "range": [ - 387, - 408 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 387, - 410 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 28 - } - } - }, - "test": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selection", - "range": [ - 371, - 380 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 44 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Literal", - "raw": "/[a-z]/", - "regex": { - "flags": "", - "pattern": "[a-z]" - }, - "value": "/[a-z]/", - "range": [ - 358, - 365 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "test", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 30 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 358, - 381 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 45 - } - } - }, - "range": [ - 358, - 439 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "range": [ - 344, - 439 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 15, - "column": 28 - } - } - } - ], - "range": [ - 338, - 440 - ], - "loc": { - "start": { - "line": 13, - "column": 2 - }, - "end": { - "line": 15, - "column": 29 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "text", - "range": [ - 444, - 448 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 6 - } - } - }, - "operator": "=", - "right": { - "type": "BinaryExpression", - "left": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 468, - 469 - ], - "loc": { - "start": { - "line": 18, - "column": 15 - }, - "end": { - "line": 18, - "column": 16 - } - } - }, - { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 471, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 32 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 462, - 467 - ], - "loc": { - "start": { - "line": 18, - "column": 9 - }, - "end": { - "line": 18, - "column": 14 - } - } - }, - "range": [ - 456, - 467 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 456, - 486 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 33 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "replacement", - "range": [ - 492, - 503 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 14 - } - } - }, - "range": [ - 456, - 503 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 19, - "column": 14 - } - } - }, - "operator": "+", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 521, - 533 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 27 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 509, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 515, - 520 - ], - "loc": { - "start": { - "line": 20, - "column": 9 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "range": [ - 509, - 520 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 509, - 534 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 456, - 534 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "range": [ - 444, - 538 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 21, - "column": 3 - } - } - }, - "range": [ - 444, - 539 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 21, - "column": 4 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AwaitExpression", - "argument": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "tick", - "range": [ - 609, - 613 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "optional": false, - "range": [ - 609, - 615 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 14 - } - } - }, - "range": [ - 603, - 615 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 14 - } - } - }, - "range": [ - 603, - 616 - ], - "loc": { - "start": { - "line": 24, - "column": 2 - }, - "end": { - "line": 24, - "column": 15 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 619, - 623 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 624, - 638 - ], - "loc": { - "start": { - "line": 25, - "column": 7 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "range": [ - 619, - 638 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 641, - 655 - ], - "loc": { - "start": { - "line": 25, - "column": 24 - }, - "end": { - "line": 25, - "column": 38 - } - } - }, - "range": [ - 619, - 655 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 38 - } - } - }, - "range": [ - 619, - 656 - ], - "loc": { - "start": { - "line": 25, - "column": 2 - }, - "end": { - "line": 25, - "column": 39 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "ThisExpression", - "range": [ - 659, - 663 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 6 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 664, - 676 - ], - "loc": { - "start": { - "line": 26, - "column": 7 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "range": [ - 659, - 676 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 19 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 679, - 691 - ], - "loc": { - "start": { - "line": 26, - "column": 22 - }, - "end": { - "line": 26, - "column": 34 - } - } - }, - "range": [ - 659, - 691 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 34 - } - } - }, - "range": [ - 659, - 692 - ], - "loc": { - "start": { - "line": 26, - "column": 2 - }, - "end": { - "line": 26, - "column": 35 - } - } - } - ], - "range": [ - 151, - 695 - ], - "loc": { - "start": { - "line": 5, - "column": 37 - }, - "end": { - "line": 27, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 130, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - ], - "range": [ - 115, - 695 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 27, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 191, - 196 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - } - ] - }, - { - "name": "selectionStart", - "identifiers": [ - { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - ], - "range": [ - 224, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "init": { - "type": "ThisExpression", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 54 - } - } - }, - "range": [ - 224, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 304, - 318 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 471, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 641, - 655 - ], - "loc": { - "start": { - "line": 25, - "column": 24 - }, - "end": { - "line": 25, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - } - ] - }, - { - "name": "selectionEnd", - "identifiers": [ - { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - ], - "range": [ - 224, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "init": { - "type": "ThisExpression", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 54 - } - } - }, - "range": [ - 224, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 320, - 332 - ], - "loc": { - "start": { - "line": 11, - "column": 48 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 521, - 533 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 679, - 691 - ], - "loc": { - "start": { - "line": 26, - "column": 22 - }, - "end": { - "line": 26, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - } - ] - }, - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "ObjectPattern", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - ], - "range": [ - 224, - 263 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 47 - } - } - }, - "init": { - "type": "ThisExpression", - "range": [ - 266, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 50 - }, - "end": { - "line": 10, - "column": 54 - } - } - }, - "range": [ - 224, - 270 - ], - "loc": { - "start": { - "line": 10, - "column": 8 - }, - "end": { - "line": 10, - "column": 54 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 292, - 297 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 509, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - } - ] - }, - { - "name": "selection", - "identifiers": [ - { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 304, - 318 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 46 - } - } - }, - { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 320, - 332 - ], - "loc": { - "start": { - "line": 11, - "column": 48 - }, - "end": { - "line": 11, - "column": 60 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "value", - "range": [ - 292, - 297 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "slice", - "range": [ - 298, - 303 - ], - "loc": { - "start": { - "line": 11, - "column": 26 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "range": [ - 292, - 303 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 292, - 333 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 61 - } - } - }, - "range": [ - 280, - 333 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 61 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 371, - 380 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 387, - 396 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 416, - 425 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - } - ] - }, - { - "name": "replacement", - "identifiers": [ - { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "init": { - "type": "ConditionalExpression", - "alternate": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selection", - "range": [ - 416, - 425 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toLowerCase", - "range": [ - 426, - 437 - ], - "loc": { - "start": { - "line": 15, - "column": 15 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "range": [ - 416, - 437 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 416, - 439 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "consequent": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "selection", - "range": [ - 387, - 396 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "toUpperCase", - "range": [ - 397, - 408 - ], - "loc": { - "start": { - "line": 14, - "column": 15 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "range": [ - 387, - 408 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 26 - } - } - }, - "optional": false, - "range": [ - 387, - 410 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 28 - } - } - }, - "test": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "selection", - "range": [ - 371, - 380 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 44 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Literal", - "raw": "/[a-z]/", - "regex": { - "flags": "", - "pattern": "[a-z]" - }, - "value": "/[a-z]/", - "range": [ - 358, - 365 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 29 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "test", - "range": [ - 366, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 30 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "range": [ - 358, - 370 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 34 - } - } - }, - "optional": false, - "range": [ - 358, - 381 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 13, - "column": 45 - } - } - }, - "range": [ - 358, - 439 - ], - "loc": { - "start": { - "line": 13, - "column": 22 - }, - "end": { - "line": 15, - "column": 28 - } - } - }, - "range": [ - 344, - 439 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 15, - "column": 28 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "replacement", - "range": [ - 492, - 503 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 6, - "column": 6 - }, - "end": { - "line": 6, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 191, - 196 - ], - "loc": { - "start": { - "line": 8, - "column": 2 - }, - "end": { - "line": 8, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 144, - 149 - ], - "loc": { - "start": { - "line": 5, - "column": 30 - }, - "end": { - "line": 5, - "column": 35 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 292, - 297 - ], - "loc": { - "start": { - "line": 11, - "column": 20 - }, - "end": { - "line": 11, - "column": 25 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 304, - 318 - ], - "loc": { - "start": { - "line": 11, - "column": 32 - }, - "end": { - "line": 11, - "column": 46 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 320, - 332 - ], - "loc": { - "start": { - "line": 11, - "column": 48 - }, - "end": { - "line": 11, - "column": 60 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "from": "function", - "init": true, - "resolved": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 371, - 380 - ], - "loc": { - "start": { - "line": 13, - "column": 35 - }, - "end": { - "line": 13, - "column": 44 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 387, - 396 - ], - "loc": { - "start": { - "line": 14, - "column": 5 - }, - "end": { - "line": 14, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selection", - "range": [ - 416, - 425 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selection", - "range": [ - 280, - 289 - ], - "loc": { - "start": { - "line": 11, - "column": 8 - }, - "end": { - "line": 11, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 444, - 448 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 456, - 461 - ], - "loc": { - "start": { - "line": 18, - "column": 3 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 471, - 485 - ], - "loc": { - "start": { - "line": 18, - "column": 18 - }, - "end": { - "line": 18, - "column": 32 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "replacement", - "range": [ - 492, - 503 - ], - "loc": { - "start": { - "line": 19, - "column": 3 - }, - "end": { - "line": 19, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "replacement", - "range": [ - 344, - 355 - ], - "loc": { - "start": { - "line": 13, - "column": 8 - }, - "end": { - "line": 13, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 509, - 514 - ], - "loc": { - "start": { - "line": 20, - "column": 3 - }, - "end": { - "line": 20, - "column": 8 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 256, - 261 - ], - "loc": { - "start": { - "line": 10, - "column": 40 - }, - "end": { - "line": 10, - "column": 45 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 521, - 533 - ], - "loc": { - "start": { - "line": 20, - "column": 15 - }, - "end": { - "line": 20, - "column": 27 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tick", - "range": [ - 609, - 613 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 641, - 655 - ], - "loc": { - "start": { - "line": 25, - "column": 24 - }, - "end": { - "line": 25, - "column": 38 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionStart", - "range": [ - 226, - 240 - ], - "loc": { - "start": { - "line": 10, - "column": 10 - }, - "end": { - "line": 10, - "column": 24 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 679, - 691 - ], - "loc": { - "start": { - "line": 26, - "column": 22 - }, - "end": { - "line": 26, - "column": 34 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "selectionEnd", - "range": [ - 242, - 254 - ], - "loc": { - "start": { - "line": 10, - "column": 26 - }, - "end": { - "line": 10, - "column": 38 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 444, - 448 - ], - "loc": { - "start": { - "line": 17, - "column": 2 - }, - "end": { - "line": 17, - "column": 6 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 46, - 50 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 9 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tick", - "range": [ - 609, - 613 - ], - "loc": { - "start": { - "line": 24, - "column": 8 - }, - "end": { - "line": 24, - "column": 12 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tick", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json index a79784f4..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1530 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "fly", - "identifiers": [ - { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "local": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 243, - 246 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 67, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 15 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "range": [ - 57, - 71 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 183, - 190 - ], - "loc": { - "start": { - "line": 11, - "column": 38 - }, - "end": { - "line": 11, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ] - }, - { - "name": "status", - "identifiers": [ - { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "init": { - "type": "Literal", - "raw": "'waiting...'", - "value": "waiting...", - "range": [ - 87, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 78, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 124, - 130 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 302, - 308 - ], - "loc": { - "start": { - "line": 18, - "column": 24 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 353, - 359 - ], - "loc": { - "start": { - "line": 19, - "column": 24 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 402, - 408 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 449, - 455 - ], - "loc": { - "start": { - "line": 21, - "column": 22 - }, - "end": { - "line": 21, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 124, - 130 - ], - "loc": { - "start": { - "line": 8, - "column": 12 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 183, - 190 - ], - "loc": { - "start": { - "line": 11, - "column": 38 - }, - "end": { - "line": 11, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 217, - 224 - ], - "loc": { - "start": { - "line": 15, - "column": 5 - }, - "end": { - "line": 15, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 4, - "column": 5 - }, - "end": { - "line": 4, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 243, - 246 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 302, - 308 - ], - "loc": { - "start": { - "line": 18, - "column": 24 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 302, - 308 - ], - "loc": { - "start": { - "line": 18, - "column": 24 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 353, - 359 - ], - "loc": { - "start": { - "line": 19, - "column": 24 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 353, - 359 - ], - "loc": { - "start": { - "line": 19, - "column": 24 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 402, - 408 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 402, - 408 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 449, - 455 - ], - "loc": { - "start": { - "line": 21, - "column": 22 - }, - "end": { - "line": 21, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 449, - 455 - ], - "loc": { - "start": { - "line": 21, - "column": 22 - }, - "end": { - "line": 21, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fly", - "range": [ - 243, - 246 - ], - "loc": { - "start": { - "line": 17, - "column": 13 - }, - "end": { - "line": 17, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fly", - "range": [ - 19, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 302, - 308 - ], - "loc": { - "start": { - "line": 18, - "column": 24 - }, - "end": { - "line": 18, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 353, - 359 - ], - "loc": { - "start": { - "line": 19, - "column": 24 - }, - "end": { - "line": 19, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 402, - 408 - ], - "loc": { - "start": { - "line": 20, - "column": 22 - }, - "end": { - "line": 20, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "status", - "range": [ - 449, - 455 - ], - "loc": { - "start": { - "line": 21, - "column": 22 - }, - "end": { - "line": 21, - "column": 28 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "status", - "range": [ - 78, - 84 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 11 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json index c20e0036..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,591 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "fade", - "identifiers": [ - { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "local": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - }, - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 188, - 192 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - }, - { - "name": "visible", - "identifiers": [ - { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "init": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 67, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 15 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "range": [ - 57, - 71 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 130, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 164, - 171 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 130, - 137 - ], - "loc": { - "start": { - "line": 7, - "column": 38 - }, - "end": { - "line": 7, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "visible", - "range": [ - 164, - 171 - ], - "loc": { - "start": { - "line": 11, - "column": 5 - }, - "end": { - "line": 11, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "visible", - "range": [ - 57, - 64 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 12 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 188, - 192 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "fade", - "range": [ - 188, - 192 - ], - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "fade", - "range": [ - 19, - 23 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 14 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json index 57e1d786..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1460 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "tweened", - "identifiers": [ - { - "type": "Identifier", - "name": "tweened", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "tweened", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "tweened", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "local": { - "type": "Identifier", - "name": "tweened", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "tweened", - "range": [ - 113, - 120 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tweened", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - } - ] - }, - { - "name": "cubicOut", - "identifiers": [ - { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - }, - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - } - ] - }, - { - "name": "progress", - "identifiers": [ - { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 121, - 122 - ], - "loc": { - "start": { - "line": 5, - "column": 26 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "duration", - "range": [ - 128, - 136 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "400", - "value": 400, - "range": [ - 138, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "range": [ - 128, - 141 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "easing", - "range": [ - 145, - 151 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 8 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "range": [ - 145, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 2 - }, - "end": { - "line": 7, - "column": 18 - } - } - } - ], - "range": [ - 124, - 164 - ], - "loc": { - "start": { - "line": 5, - "column": 29 - }, - "end": { - "line": 8, - "column": 2 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "tweened", - "range": [ - 113, - 120 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "optional": false, - "range": [ - 113, - 165 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 8, - "column": 3 - } - } - }, - "range": [ - 102, - 165 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 8, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$progress", - "range": [ - 261, - 270 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 310, - 318 - ], - "loc": { - "start": { - "line": 20, - "column": 25 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 369, - 377 - ], - "loc": { - "start": { - "line": 24, - "column": 25 - }, - "end": { - "line": 24, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 28, - "column": 25 - }, - "end": { - "line": 28, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 494, - 502 - ], - "loc": { - "start": { - "line": 32, - "column": 25 - }, - "end": { - "line": 32, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 557, - 565 - ], - "loc": { - "start": { - "line": 36, - "column": 25 - }, - "end": { - "line": 36, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "tweened", - "range": [ - 113, - 120 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "tweened", - "range": [ - 19, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 17 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 7, - "column": 10 - }, - "end": { - "line": 7, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "cubicOut", - "range": [ - 61, - 69 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$progress", - "range": [ - 261, - 270 - ], - "loc": { - "start": { - "line": 18, - "column": 17 - }, - "end": { - "line": 18, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 310, - 318 - ], - "loc": { - "start": { - "line": 20, - "column": 25 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 310, - 318 - ], - "loc": { - "start": { - "line": 20, - "column": 25 - }, - "end": { - "line": 20, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 369, - 377 - ], - "loc": { - "start": { - "line": 24, - "column": 25 - }, - "end": { - "line": 24, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 369, - 377 - ], - "loc": { - "start": { - "line": 24, - "column": 25 - }, - "end": { - "line": 24, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 28, - "column": 25 - }, - "end": { - "line": 28, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 432, - 440 - ], - "loc": { - "start": { - "line": 28, - "column": 25 - }, - "end": { - "line": 28, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 494, - 502 - ], - "loc": { - "start": { - "line": 32, - "column": 25 - }, - "end": { - "line": 32, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 494, - 502 - ], - "loc": { - "start": { - "line": 32, - "column": 25 - }, - "end": { - "line": 32, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 557, - 565 - ], - "loc": { - "start": { - "line": 36, - "column": 25 - }, - "end": { - "line": 36, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "progress", - "range": [ - 557, - 565 - ], - "loc": { - "start": { - "line": 36, - "column": 25 - }, - "end": { - "line": 36, - "column": 33 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "progress", - "range": [ - 102, - 110 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json index fb693c1a..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,11170 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "Eliza", - "identifiers": [ - { - "type": "Identifier", - "name": "Eliza", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 333, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - } - ] - }, - { - "name": "beforeUpdate", - "identifiers": [ - { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "local": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - } - ] - }, - { - "name": "afterUpdate", - "identifiers": [ - { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - }, - "local": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - }, - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 235, - 246 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - } - } - ] - }, - { - "name": "div", - "identifiers": [ - { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "init": null, - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 159, - 162 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 167, - 170 - ], - "loc": { - "start": { - "line": 9, - "column": 23 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 186, - 189 - ], - "loc": { - "start": { - "line": 9, - "column": 42 - }, - "end": { - "line": 9, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 204, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 60 - }, - "end": { - "line": 9, - "column": 63 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 273, - 276 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 289, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 34 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 1652, - 1655 - ], - "loc": { - "start": { - "line": 98, - "column": 36 - }, - "end": { - "line": 98, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "name": "autoscroll", - "identifiers": [ - { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - }, - "init": null, - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 146, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 261, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - } - ] - }, - { - "name": "eliza", - "identifiers": [ - { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "init": { - "type": "NewExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 333, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 24 - } - } - }, - "range": [ - 329, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 15 - }, - "end": { - "line": 16, - "column": 26 - } - } - }, - "range": [ - 321, - 340 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 26 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 27 - }, - "end": { - "line": 19, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - } - ] - }, - { - "name": "comments", - "identifiers": [ - { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 365, - 371 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'eliza'", - "value": "eliza", - "range": [ - 373, - 380 - ], - "loc": { - "start": { - "line": 19, - "column": 12 - }, - "end": { - "line": 19, - "column": 19 - } - } - }, - "range": [ - 365, - 380 - ], - "loc": { - "start": { - "line": 19, - "column": 4 - }, - "end": { - "line": 19, - "column": 19 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 382, - 386 - ], - "loc": { - "start": { - "line": 19, - "column": 21 - }, - "end": { - "line": 19, - "column": 25 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "eliza", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 27 - }, - "end": { - "line": 19, - "column": 32 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "getInitial", - "range": [ - 394, - 404 - ], - "loc": { - "start": { - "line": 19, - "column": 33 - }, - "end": { - "line": 19, - "column": 43 - } - } - }, - "range": [ - 388, - 404 - ], - "loc": { - "start": { - "line": 19, - "column": 27 - }, - "end": { - "line": 19, - "column": 43 - } - } - }, - "optional": false, - "range": [ - 388, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 27 - }, - "end": { - "line": 19, - "column": 45 - } - } - }, - "range": [ - 382, - 406 - ], - "loc": { - "start": { - "line": 19, - "column": 21 - }, - "end": { - "line": 19, - "column": 45 - } - } - } - ], - "range": [ - 363, - 408 - ], - "loc": { - "start": { - "line": 19, - "column": 2 - }, - "end": { - "line": 19, - "column": 47 - } - } - } - ], - "range": [ - 359, - 411 - ], - "loc": { - "start": { - "line": 18, - "column": 16 - }, - "end": { - "line": 20, - "column": 2 - } - } - }, - "range": [ - 348, - 411 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 20, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 540, - 548 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 551, - 559 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 1667, - 1675 - ], - "loc": { - "start": { - "line": 99, - "column": 9 - }, - "end": { - "line": 99, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - } - ] - }, - { - "name": "handleKeydown", - "identifiers": [ - { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 424, - 437 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 23 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 424, - 437 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 23 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 494, - 499 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 500, - 506 - ], - "loc": { - "start": { - "line": 24, - "column": 22 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 494, - 506 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 507, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 29 - }, - "end": { - "line": 24, - "column": 34 - } - } - }, - "range": [ - 494, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 34 - } - } - }, - "range": [ - 487, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 34 - } - } - } - ], - "range": [ - 481, - 513 - ], - "loc": { - "start": { - "line": 24, - "column": 3 - }, - "end": { - "line": 24, - "column": 35 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 528, - 535 - ], - "loc": { - "start": { - "line": 25, - "column": 14 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "text", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 521, - 526 - ], - "loc": { - "start": { - "line": 25, - "column": 7 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "range": [ - 517, - 535 - ], - "loc": { - "start": { - "line": 25, - "column": 3 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "comments", - "range": [ - 540, - 548 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 573, - 579 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'user'", - "value": "user", - "range": [ - 581, - 587 - ], - "loc": { - "start": { - "line": 28, - "column": 12 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - "range": [ - 573, - 587 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "text", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - } - ], - "range": [ - 567, - 602 - ], - "loc": { - "start": { - "line": 27, - "column": 30 - }, - "end": { - "line": 30, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comments", - "range": [ - 551, - 559 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 560, - 566 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 29 - } - } - }, - "range": [ - 551, - 566 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 551, - 603 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 30, - "column": 5 - } - } - }, - "range": [ - 540, - 603 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 30, - "column": 5 - } - } - }, - "range": [ - 540, - 604 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 615, - 621 - ], - "loc": { - "start": { - "line": 32, - "column": 9 - }, - "end": { - "line": 32, - "column": 15 - } - } - }, - "range": [ - 609, - 621 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 622, - 627 - ], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "range": [ - 609, - 627 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 630, - 632 - ], - "loc": { - "start": { - "line": 32, - "column": 24 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "range": [ - 609, - 632 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "range": [ - 609, - 633 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 27 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 668, - 672 - ], - "loc": { - "start": { - "line": 34, - "column": 33 - }, - "end": { - "line": 34, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 658, - 667 - ], - "loc": { - "start": { - "line": 34, - "column": 23 - }, - "end": { - "line": 34, - "column": 32 - } - } - }, - "range": [ - 652, - 667 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 32 - } - } - }, - "optional": false, - "range": [ - 652, - 673 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 38 - } - } - }, - "range": [ - 644, - 673 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 38 - } - } - } - ], - "range": [ - 638, - 674 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 39 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 736, - 742 - ], - "loc": { - "start": { - "line": 38, - "column": 5 - }, - "end": { - "line": 38, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'eliza'", - "value": "eliza", - "range": [ - 744, - 751 - ], - "loc": { - "start": { - "line": 38, - "column": 13 - }, - "end": { - "line": 38, - "column": 20 - } - } - }, - "range": [ - 736, - 751 - ], - "loc": { - "start": { - "line": 38, - "column": 5 - }, - "end": { - "line": 38, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 758, - 762 - ], - "loc": { - "start": { - "line": 39, - "column": 5 - }, - "end": { - "line": 39, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'...'", - "value": "...", - "range": [ - 764, - 769 - ], - "loc": { - "start": { - "line": 39, - "column": 11 - }, - "end": { - "line": 39, - "column": 16 - } - } - }, - "range": [ - 758, - 769 - ], - "loc": { - "start": { - "line": 39, - "column": 5 - }, - "end": { - "line": 39, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "placeholder", - "range": [ - 776, - 787 - ], - "loc": { - "start": { - "line": 40, - "column": 5 - }, - "end": { - "line": 40, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 789, - 793 - ], - "loc": { - "start": { - "line": 40, - "column": 18 - }, - "end": { - "line": 40, - "column": 22 - } - } - }, - "range": [ - 776, - 793 - ], - "loc": { - "start": { - "line": 40, - "column": 5 - }, - "end": { - "line": 40, - "column": 22 - } - } - } - ], - "range": [ - 729, - 799 - ], - "loc": { - "start": { - "line": 37, - "column": 31 - }, - "end": { - "line": 41, - "column": 5 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 722, - 728 - ], - "loc": { - "start": { - "line": 37, - "column": 24 - }, - "end": { - "line": 37, - "column": 30 - } - } - }, - "range": [ - 713, - 728 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 30 - } - } - }, - "optional": false, - "range": [ - 713, - 800 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 41, - "column": 6 - } - } - }, - "range": [ - 702, - 800 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 41, - "column": 6 - } - } - }, - "range": [ - 702, - 801 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 906, - 912 - ], - "loc": { - "start": { - "line": 45, - "column": 6 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'eliza'", - "value": "eliza", - "range": [ - 914, - 921 - ], - "loc": { - "start": { - "line": 45, - "column": 14 - }, - "end": { - "line": 45, - "column": 21 - } - } - }, - "range": [ - 906, - 921 - ], - "loc": { - "start": { - "line": 45, - "column": 6 - }, - "end": { - "line": 45, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 929, - 933 - ], - "loc": { - "start": { - "line": 46, - "column": 6 - }, - "end": { - "line": 46, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "reply", - "range": [ - 935, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 12 - }, - "end": { - "line": 46, - "column": 17 - } - } - }, - "range": [ - 929, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 6 - }, - "end": { - "line": 46, - "column": 17 - } - } - } - ], - "range": [ - 898, - 947 - ], - "loc": { - "start": { - "line": 44, - "column": 72 - }, - "end": { - "line": 47, - "column": 6 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comment", - "range": [ - 870, - 877 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 51 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "placeholder", - "range": [ - 878, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 52 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "range": [ - 870, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 869, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 43 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - } - ], - "range": [ - 858, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 63 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 851, - 857 - ], - "loc": { - "start": { - "line": 44, - "column": 25 - }, - "end": { - "line": 44, - "column": 31 - } - } - }, - "range": [ - 842, - 857 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 842, - 890 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 64 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 891, - 897 - ], - "loc": { - "start": { - "line": 44, - "column": 65 - }, - "end": { - "line": 44, - "column": 71 - } - } - }, - "range": [ - 842, - 897 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 71 - } - } - }, - "optional": false, - "range": [ - 842, - 948 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "range": [ - 831, - 948 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "range": [ - 831, - 949 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 47, - "column": 8 - } - } - } - ], - "range": [ - 824, - 955 - ], - "loc": { - "start": { - "line": 43, - "column": 21 - }, - "end": { - "line": 48, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 818, - 955 - ], - "loc": { - "start": { - "line": 43, - "column": 15 - }, - "end": { - "line": 48, - "column": 5 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 957, - 960 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 10 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 968, - 974 - ], - "loc": { - "start": { - "line": 48, - "column": 18 - }, - "end": { - "line": 48, - "column": 24 - } - } - }, - "range": [ - 963, - 974 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 963, - 976 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 979, - 982 - ], - "loc": { - "start": { - "line": 48, - "column": 29 - }, - "end": { - "line": 48, - "column": 32 - } - } - }, - "range": [ - 963, - 982 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 32 - } - } - }, - "range": [ - 957, - 982 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 32 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 807, - 983 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 48, - "column": 33 - } - } - }, - "range": [ - 807, - 984 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 48, - "column": 34 - } - } - } - ], - "range": [ - 696, - 989 - ], - "loc": { - "start": { - "line": 36, - "column": 20 - }, - "end": { - "line": 49, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 690, - 989 - ], - "loc": { - "start": { - "line": 36, - "column": 14 - }, - "end": { - "line": 49, - "column": 4 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 991, - 994 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 9 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 1002, - 1008 - ], - "loc": { - "start": { - "line": 49, - "column": 17 - }, - "end": { - "line": 49, - "column": 23 - } - } - }, - "range": [ - 997, - 1008 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 23 - } - } - }, - "optional": false, - "range": [ - 997, - 1010 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 1013, - 1016 - ], - "loc": { - "start": { - "line": 49, - "column": 28 - }, - "end": { - "line": 49, - "column": 31 - } - } - }, - "range": [ - 997, - 1016 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 31 - } - } - }, - "range": [ - 991, - 1016 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 31 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "optional": false, - "range": [ - 679, - 1017 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 49, - "column": 32 - } - } - }, - "range": [ - 679, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 49, - "column": 33 - } - } - } - ], - "range": [ - 476, - 1022 - ], - "loc": { - "start": { - "line": 23, - "column": 29 - }, - "end": { - "line": 50, - "column": 3 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 453, - 458 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 459, - 462 - ], - "loc": { - "start": { - "line": 23, - "column": 12 - }, - "end": { - "line": 23, - "column": 15 - } - } - }, - "range": [ - 453, - 462 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 15 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'Enter'", - "value": "Enter", - "range": [ - 467, - 474 - ], - "loc": { - "start": { - "line": 23, - "column": 20 - }, - "end": { - "line": 23, - "column": 27 - } - } - }, - "range": [ - 453, - 474 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 27 - } - } - }, - "range": [ - 449, - 1022 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 50, - "column": 3 - } - } - } - ], - "range": [ - 445, - 1025 - ], - "loc": { - "start": { - "line": 22, - "column": 31 - }, - "end": { - "line": 51, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 424, - 437 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - ], - "range": [ - 415, - 1025 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 51, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 1809, - 1822 - ], - "loc": { - "start": { - "line": 106, - "column": 20 - }, - "end": { - "line": 106, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 424, - 437 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 23 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 123, - 135 - ], - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 13 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "beforeUpdate", - "range": [ - 50, - 62 - ], - "loc": { - "start": { - "line": 3, - "column": 10 - }, - "end": { - "line": 3, - "column": 22 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 235, - 246 - ], - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "afterUpdate", - "range": [ - 64, - 75 - ], - "loc": { - "start": { - "line": 3, - "column": 24 - }, - "end": { - "line": 3, - "column": 35 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 333, - 338 - ], - "loc": { - "start": { - "line": 16, - "column": 19 - }, - "end": { - "line": 16, - "column": 24 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Eliza", - "range": [ - 17, - 22 - ], - "loc": { - "start": { - "line": 2, - "column": 8 - }, - "end": { - "line": 2, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 388, - 393 - ], - "loc": { - "start": { - "line": 19, - "column": 27 - }, - "end": { - "line": 19, - "column": 32 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 1652, - 1655 - ], - "loc": { - "start": { - "line": 98, - "column": 36 - }, - "end": { - "line": 98, - "column": 39 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 1667, - 1675 - ], - "loc": { - "start": { - "line": 99, - "column": 9 - }, - "end": { - "line": 99, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 1809, - 1822 - ], - "loc": { - "start": { - "line": 106, - "column": 20 - }, - "end": { - "line": 106, - "column": 33 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 424, - 437 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 23 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 146, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 159, - 162 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 167, - 170 - ], - "loc": { - "start": { - "line": 9, - "column": 23 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 186, - 189 - ], - "loc": { - "start": { - "line": 9, - "column": 42 - }, - "end": { - "line": 9, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 204, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 60 - }, - "end": { - "line": 9, - "column": 63 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 146, - 156 - ], - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 159, - 162 - ], - "loc": { - "start": { - "line": 9, - "column": 15 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 167, - 170 - ], - "loc": { - "start": { - "line": 9, - "column": 23 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 186, - 189 - ], - "loc": { - "start": { - "line": 9, - "column": 42 - }, - "end": { - "line": 9, - "column": 45 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 204, - 207 - ], - "loc": { - "start": { - "line": 9, - "column": 60 - }, - "end": { - "line": 9, - "column": 63 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 261, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 273, - 276 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 289, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 34 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 261, - 271 - ], - "loc": { - "start": { - "line": 13, - "column": 6 - }, - "end": { - "line": 13, - "column": 16 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "autoscroll", - "range": [ - 109, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 5 - }, - "end": { - "line": 6, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 273, - 276 - ], - "loc": { - "start": { - "line": 13, - "column": 18 - }, - "end": { - "line": 13, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "div", - "range": [ - 289, - 292 - ], - "loc": { - "start": { - "line": 13, - "column": 34 - }, - "end": { - "line": 13, - "column": 37 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "div", - "range": [ - 99, - 102 - ], - "loc": { - "start": { - "line": 5, - "column": 5 - }, - "end": { - "line": 5, - "column": 8 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "event", - "identifiers": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "BlockStatement", - "body": [ - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 494, - 499 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 500, - 506 - ], - "loc": { - "start": { - "line": 24, - "column": 22 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 494, - 506 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 507, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 29 - }, - "end": { - "line": 24, - "column": 34 - } - } - }, - "range": [ - 494, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 34 - } - } - }, - "range": [ - 487, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 34 - } - } - } - ], - "range": [ - 481, - 513 - ], - "loc": { - "start": { - "line": 24, - "column": 3 - }, - "end": { - "line": 24, - "column": 35 - } - } - }, - { - "type": "IfStatement", - "alternate": null, - "consequent": { - "type": "ReturnStatement", - "argument": null, - "range": [ - 528, - 535 - ], - "loc": { - "start": { - "line": 25, - "column": 14 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - "test": { - "type": "UnaryExpression", - "argument": { - "type": "Identifier", - "name": "text", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 521, - 526 - ], - "loc": { - "start": { - "line": 25, - "column": 7 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "range": [ - 517, - 535 - ], - "loc": { - "start": { - "line": 25, - "column": 3 - }, - "end": { - "line": 25, - "column": 21 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "comments", - "range": [ - 540, - 548 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 573, - 579 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'user'", - "value": "user", - "range": [ - 581, - 587 - ], - "loc": { - "start": { - "line": 28, - "column": 12 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - "range": [ - 573, - 587 - ], - "loc": { - "start": { - "line": 28, - "column": 4 - }, - "end": { - "line": 28, - "column": 18 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "method": false, - "shorthand": true, - "value": { - "type": "Identifier", - "name": "text", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - } - ], - "range": [ - 567, - 602 - ], - "loc": { - "start": { - "line": 27, - "column": 30 - }, - "end": { - "line": 30, - "column": 4 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comments", - "range": [ - 551, - 559 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 560, - 566 - ], - "loc": { - "start": { - "line": 27, - "column": 23 - }, - "end": { - "line": 27, - "column": 29 - } - } - }, - "range": [ - 551, - 566 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 551, - 603 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 30, - "column": 5 - } - } - }, - "range": [ - 540, - 603 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 30, - "column": 5 - } - } - }, - "range": [ - 540, - 604 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 30, - "column": 6 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 8 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 615, - 621 - ], - "loc": { - "start": { - "line": 32, - "column": 9 - }, - "end": { - "line": 32, - "column": 15 - } - } - }, - "range": [ - 609, - 621 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 15 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 622, - 627 - ], - "loc": { - "start": { - "line": 32, - "column": 16 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "range": [ - 609, - 627 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 21 - } - } - }, - "operator": "=", - "right": { - "type": "Literal", - "raw": "''", - "value": "", - "range": [ - 630, - 632 - ], - "loc": { - "start": { - "line": 32, - "column": 24 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "range": [ - 609, - 632 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 26 - } - } - }, - "range": [ - 609, - 633 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 27 - } - } - }, - { - "type": "VariableDeclaration", - "kind": "const", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 668, - 672 - ], - "loc": { - "start": { - "line": 34, - "column": 33 - }, - "end": { - "line": 34, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 658, - 667 - ], - "loc": { - "start": { - "line": 34, - "column": 23 - }, - "end": { - "line": 34, - "column": 32 - } - } - }, - "range": [ - 652, - 667 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 32 - } - } - }, - "optional": false, - "range": [ - 652, - 673 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 38 - } - } - }, - "range": [ - 644, - 673 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 38 - } - } - } - ], - "range": [ - 638, - 674 - ], - "loc": { - "start": { - "line": 34, - "column": 3 - }, - "end": { - "line": 34, - "column": 39 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 736, - 742 - ], - "loc": { - "start": { - "line": 38, - "column": 5 - }, - "end": { - "line": 38, - "column": 11 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'eliza'", - "value": "eliza", - "range": [ - 744, - 751 - ], - "loc": { - "start": { - "line": 38, - "column": 13 - }, - "end": { - "line": 38, - "column": 20 - } - } - }, - "range": [ - 736, - 751 - ], - "loc": { - "start": { - "line": 38, - "column": 5 - }, - "end": { - "line": 38, - "column": 20 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 758, - 762 - ], - "loc": { - "start": { - "line": 39, - "column": 5 - }, - "end": { - "line": 39, - "column": 9 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'...'", - "value": "...", - "range": [ - 764, - 769 - ], - "loc": { - "start": { - "line": 39, - "column": 11 - }, - "end": { - "line": 39, - "column": 16 - } - } - }, - "range": [ - 758, - 769 - ], - "loc": { - "start": { - "line": 39, - "column": 5 - }, - "end": { - "line": 39, - "column": 16 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "placeholder", - "range": [ - 776, - 787 - ], - "loc": { - "start": { - "line": 40, - "column": 5 - }, - "end": { - "line": 40, - "column": 16 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "true", - "value": true, - "range": [ - 789, - 793 - ], - "loc": { - "start": { - "line": 40, - "column": 18 - }, - "end": { - "line": 40, - "column": 22 - } - } - }, - "range": [ - 776, - 793 - ], - "loc": { - "start": { - "line": 40, - "column": 5 - }, - "end": { - "line": 40, - "column": 22 - } - } - } - ], - "range": [ - 729, - 799 - ], - "loc": { - "start": { - "line": 37, - "column": 31 - }, - "end": { - "line": 41, - "column": 5 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 722, - 728 - ], - "loc": { - "start": { - "line": 37, - "column": 24 - }, - "end": { - "line": 37, - "column": 30 - } - } - }, - "range": [ - 713, - 728 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 30 - } - } - }, - "optional": false, - "range": [ - 713, - 800 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 41, - "column": 6 - } - } - }, - "range": [ - 702, - 800 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 41, - "column": 6 - } - } - }, - "range": [ - 702, - 801 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 41, - "column": 7 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ObjectExpression", - "properties": [ - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "author", - "range": [ - 906, - 912 - ], - "loc": { - "start": { - "line": 45, - "column": 6 - }, - "end": { - "line": 45, - "column": 12 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Literal", - "raw": "'eliza'", - "value": "eliza", - "range": [ - 914, - 921 - ], - "loc": { - "start": { - "line": 45, - "column": 14 - }, - "end": { - "line": 45, - "column": 21 - } - } - }, - "range": [ - 906, - 921 - ], - "loc": { - "start": { - "line": 45, - "column": 6 - }, - "end": { - "line": 45, - "column": 21 - } - } - }, - { - "type": "Property", - "kind": "init", - "computed": false, - "key": { - "type": "Identifier", - "name": "text", - "range": [ - 929, - 933 - ], - "loc": { - "start": { - "line": 46, - "column": 6 - }, - "end": { - "line": 46, - "column": 10 - } - } - }, - "method": false, - "shorthand": false, - "value": { - "type": "Identifier", - "name": "reply", - "range": [ - 935, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 12 - }, - "end": { - "line": 46, - "column": 17 - } - } - }, - "range": [ - 929, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 6 - }, - "end": { - "line": 46, - "column": 17 - } - } - } - ], - "range": [ - 898, - 947 - ], - "loc": { - "start": { - "line": 44, - "column": 72 - }, - "end": { - "line": 47, - "column": 6 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comment", - "range": [ - 870, - 877 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 51 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "placeholder", - "range": [ - 878, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 52 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "range": [ - 870, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 869, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 43 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - } - ], - "range": [ - 858, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 63 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "filter", - "range": [ - 851, - 857 - ], - "loc": { - "start": { - "line": 44, - "column": 25 - }, - "end": { - "line": 44, - "column": 31 - } - } - }, - "range": [ - 842, - 857 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 31 - } - } - }, - "optional": false, - "range": [ - 842, - 890 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 64 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "concat", - "range": [ - 891, - 897 - ], - "loc": { - "start": { - "line": 44, - "column": 65 - }, - "end": { - "line": 44, - "column": 71 - } - } - }, - "range": [ - 842, - 897 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 71 - } - } - }, - "optional": false, - "range": [ - 842, - 948 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "range": [ - 831, - 948 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 47, - "column": 7 - } - } - }, - "range": [ - 831, - 949 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 47, - "column": 8 - } - } - } - ], - "range": [ - 824, - 955 - ], - "loc": { - "start": { - "line": 43, - "column": 21 - }, - "end": { - "line": 48, - "column": 5 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 818, - 955 - ], - "loc": { - "start": { - "line": 43, - "column": 15 - }, - "end": { - "line": 48, - "column": 5 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 957, - 960 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 10 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 968, - 974 - ], - "loc": { - "start": { - "line": 48, - "column": 18 - }, - "end": { - "line": 48, - "column": 24 - } - } - }, - "range": [ - 963, - 974 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 963, - 976 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 26 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "500", - "value": 500, - "range": [ - 979, - 982 - ], - "loc": { - "start": { - "line": 48, - "column": 29 - }, - "end": { - "line": 48, - "column": 32 - } - } - }, - "range": [ - 963, - 982 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 32 - } - } - }, - "range": [ - 957, - 982 - ], - "loc": { - "start": { - "line": 48, - "column": 7 - }, - "end": { - "line": 48, - "column": 32 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 807, - 983 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 48, - "column": 33 - } - } - }, - "range": [ - 807, - 984 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 48, - "column": 34 - } - } - } - ], - "range": [ - 696, - 989 - ], - "loc": { - "start": { - "line": 36, - "column": 20 - }, - "end": { - "line": 49, - "column": 4 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [], - "range": [ - 690, - 989 - ], - "loc": { - "start": { - "line": 36, - "column": 14 - }, - "end": { - "line": 49, - "column": 4 - } - } - }, - { - "type": "BinaryExpression", - "left": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 991, - 994 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 9 - } - } - }, - "operator": "+", - "right": { - "type": "BinaryExpression", - "left": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "random", - "range": [ - 1002, - 1008 - ], - "loc": { - "start": { - "line": 49, - "column": 17 - }, - "end": { - "line": 49, - "column": 23 - } - } - }, - "range": [ - 997, - 1008 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 23 - } - } - }, - "optional": false, - "range": [ - 997, - 1010 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 25 - } - } - }, - "operator": "*", - "right": { - "type": "Literal", - "raw": "200", - "value": 200, - "range": [ - 1013, - 1016 - ], - "loc": { - "start": { - "line": 49, - "column": 28 - }, - "end": { - "line": 49, - "column": 31 - } - } - }, - "range": [ - 997, - 1016 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 31 - } - } - }, - "range": [ - 991, - 1016 - ], - "loc": { - "start": { - "line": 49, - "column": 6 - }, - "end": { - "line": 49, - "column": 31 - } - } - } - ], - "callee": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "optional": false, - "range": [ - 679, - 1017 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 49, - "column": 32 - } - } - }, - "range": [ - 679, - 1018 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 49, - "column": 33 - } - } - } - ], - "range": [ - 476, - 1022 - ], - "loc": { - "start": { - "line": 23, - "column": 29 - }, - "end": { - "line": 50, - "column": 3 - } - } - }, - "test": { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 453, - 458 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "key", - "range": [ - 459, - 462 - ], - "loc": { - "start": { - "line": 23, - "column": 12 - }, - "end": { - "line": 23, - "column": 15 - } - } - }, - "range": [ - 453, - 462 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 15 - } - } - }, - "operator": "===", - "right": { - "type": "Literal", - "raw": "'Enter'", - "value": "Enter", - "range": [ - 467, - 474 - ], - "loc": { - "start": { - "line": 23, - "column": 20 - }, - "end": { - "line": 23, - "column": 27 - } - } - }, - "range": [ - 453, - 474 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 27 - } - } - }, - "range": [ - 449, - 1022 - ], - "loc": { - "start": { - "line": 23, - "column": 2 - }, - "end": { - "line": 50, - "column": 3 - } - } - } - ], - "range": [ - 445, - 1025 - ], - "loc": { - "start": { - "line": 22, - "column": 31 - }, - "end": { - "line": 51, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "handleKeydown", - "range": [ - 424, - 437 - ], - "loc": { - "start": { - "line": 22, - "column": 10 - }, - "end": { - "line": 22, - "column": 23 - } - } - }, - "params": [ - { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - ], - "range": [ - 415, - 1025 - ], - "loc": { - "start": { - "line": 22, - "column": 1 - }, - "end": { - "line": 51, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 453, - 458 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 494, - 499 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 8 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 453, - 458 - ], - "loc": { - "start": { - "line": 23, - "column": 6 - }, - "end": { - "line": 23, - "column": 11 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - } - ], - "childScopes": [ - { - "type": "block", - "variables": [ - { - "name": "text", - "identifiers": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "init": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "event", - "range": [ - 494, - 499 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 21 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "target", - "range": [ - 500, - 506 - ], - "loc": { - "start": { - "line": 24, - "column": 22 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "range": [ - 494, - 506 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 28 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "value", - "range": [ - 507, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 29 - }, - "end": { - "line": 24, - "column": 34 - } - } - }, - "range": [ - 494, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 34 - } - } - }, - "range": [ - 487, - 512 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 34 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 668, - 672 - ], - "loc": { - "start": { - "line": 34, - "column": 33 - }, - "end": { - "line": 34, - "column": 37 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - } - ] - }, - { - "name": "reply", - "identifiers": [ - { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "Identifier", - "name": "text", - "range": [ - 668, - 672 - ], - "loc": { - "start": { - "line": 34, - "column": 33 - }, - "end": { - "line": 34, - "column": 37 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "transform", - "range": [ - 658, - 667 - ], - "loc": { - "start": { - "line": 34, - "column": 23 - }, - "end": { - "line": 34, - "column": 32 - } - } - }, - "range": [ - 652, - 667 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 32 - } - } - }, - "optional": false, - "range": [ - 652, - 673 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 38 - } - } - }, - "range": [ - 644, - 673 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 38 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "reply", - "range": [ - 935, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 12 - }, - "end": { - "line": 46, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 494, - 499 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 522, - 526 - ], - "loc": { - "start": { - "line": 25, - "column": 8 - }, - "end": { - "line": 25, - "column": 12 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 540, - 548 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 551, - 559 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 593, - 597 - ], - "loc": { - "start": { - "line": 29, - "column": 4 - }, - "end": { - "line": 29, - "column": 8 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 8 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - }, - "from": "block", - "init": true, - "resolved": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "text", - "range": [ - 668, - 672 - ], - "loc": { - "start": { - "line": 34, - "column": 33 - }, - "end": { - "line": 34, - "column": 37 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "text", - "range": [ - 487, - 491 - ], - "loc": { - "start": { - "line": 24, - "column": 9 - }, - "end": { - "line": 24, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "reply", - "range": [ - 935, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 12 - }, - "end": { - "line": 46, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "comment", - "identifiers": [ - { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "UnaryExpression", - "argument": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comment", - "range": [ - 870, - 877 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 51 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "placeholder", - "range": [ - 878, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 52 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "range": [ - 870, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "operator": "!", - "prefix": true, - "range": [ - 869, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 43 - }, - "end": { - "line": 44, - "column": 63 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - } - ], - "range": [ - 858, - 889 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 63 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comment", - "range": [ - 870, - 877 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comment", - "range": [ - 870, - 877 - ], - "loc": { - "start": { - "line": 44, - "column": 44 - }, - "end": { - "line": 44, - "column": 51 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comment", - "range": [ - 858, - 865 - ], - "loc": { - "start": { - "line": 44, - "column": 32 - }, - "end": { - "line": 44, - "column": 39 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "reply", - "range": [ - 935, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 12 - }, - "end": { - "line": 46, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "reply", - "range": [ - 935, - 940 - ], - "loc": { - "start": { - "line": 46, - "column": 12 - }, - "end": { - "line": 46, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "reply", - "range": [ - 644, - 649 - ], - "loc": { - "start": { - "line": 34, - "column": 9 - }, - "end": { - "line": 34, - "column": 14 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 494, - 499 - ], - "loc": { - "start": { - "line": 24, - "column": 16 - }, - "end": { - "line": 24, - "column": 21 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 540, - 548 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 551, - 559 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "event", - "range": [ - 609, - 614 - ], - "loc": { - "start": { - "line": 32, - "column": 3 - }, - "end": { - "line": 32, - "column": 8 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "event", - "range": [ - 438, - 443 - ], - "loc": { - "start": { - "line": 22, - "column": 24 - }, - "end": { - "line": 22, - "column": 29 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 540, - 548 - ], - "loc": { - "start": { - "line": 27, - "column": 3 - }, - "end": { - "line": 27, - "column": 11 - } - } - }, - "from": "block", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 551, - 559 - ], - "loc": { - "start": { - "line": 27, - "column": 14 - }, - "end": { - "line": 27, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "eliza", - "range": [ - 652, - 657 - ], - "loc": { - "start": { - "line": 34, - "column": 17 - }, - "end": { - "line": 34, - "column": 22 - } - } - }, - "from": "block", - "init": null, - "resolved": { - "type": "Identifier", - "name": "eliza", - "range": [ - 321, - 326 - ], - "loc": { - "start": { - "line": 16, - "column": 7 - }, - "end": { - "line": 16, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 702, - 710 - ], - "loc": { - "start": { - "line": 37, - "column": 4 - }, - "end": { - "line": 37, - "column": 12 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 713, - 721 - ], - "loc": { - "start": { - "line": 37, - "column": 15 - }, - "end": { - "line": 37, - "column": 23 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 831, - 839 - ], - "loc": { - "start": { - "line": 44, - "column": 5 - }, - "end": { - "line": 44, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comments", - "range": [ - 842, - 850 - ], - "loc": { - "start": { - "line": 44, - "column": 16 - }, - "end": { - "line": 44, - "column": 24 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comments", - "range": [ - 348, - 356 - ], - "loc": { - "start": { - "line": 18, - "column": 5 - }, - "end": { - "line": 18, - "column": 13 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "comment", - "identifiers": [ - { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - }, - "node": { - "type": "SvelteEachBlock", - "expression": { - "type": "Identifier", - "name": "comments", - "range": [ - 1667, - 1675 - ], - "loc": { - "start": { - "line": 99, - "column": 9 - }, - "end": { - "line": 99, - "column": 17 - } - } - }, - "context": { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - }, - "index": null, - "key": null, - "children": [ - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "article", - "range": [ - 1692, - 1699 - ], - "loc": { - "start": { - "line": 100, - "column": 4 - }, - "end": { - "line": 100, - "column": 11 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [ - { - "type": "SvelteAttribute", - "key": { - "type": "SvelteName", - "name": "class", - "range": [ - 1700, - 1705 - ], - "loc": { - "start": { - "line": 100, - "column": 12 - }, - "end": { - "line": 100, - "column": 17 - } - } - }, - "boolean": false, - "value": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comment", - "range": [ - 1707, - 1714 - ], - "loc": { - "start": { - "line": 100, - "column": 19 - }, - "end": { - "line": 100, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "author", - "range": [ - 1715, - 1721 - ], - "loc": { - "start": { - "line": 100, - "column": 27 - }, - "end": { - "line": 100, - "column": 33 - } - } - }, - "range": [ - 1707, - 1721 - ], - "loc": { - "start": { - "line": 100, - "column": 19 - }, - "end": { - "line": 100, - "column": 33 - } - } - }, - "range": [ - 1706, - 1722 - ], - "loc": { - "start": { - "line": 100, - "column": 18 - }, - "end": { - "line": 100, - "column": 34 - } - } - } - ], - "range": [ - 1700, - 1722 - ], - "loc": { - "start": { - "line": 100, - "column": 12 - }, - "end": { - "line": 100, - "column": 34 - } - } - } - ], - "selfClosing": false, - "range": [ - 1691, - 1723 - ], - "loc": { - "start": { - "line": 100, - "column": 3 - }, - "end": { - "line": 100, - "column": 35 - } - } - }, - "children": [ - { - "type": "SvelteText", - "value": "\n\t\t\t\t", - "range": [ - 1723, - 1728 - ], - "loc": { - "start": { - "line": 100, - "column": 35 - }, - "end": { - "line": 101, - "column": 4 - } - } - }, - { - "type": "SvelteElement", - "kind": "html", - "name": { - "type": "SvelteName", - "name": "span", - "range": [ - 1729, - 1733 - ], - "loc": { - "start": { - "line": 101, - "column": 5 - }, - "end": { - "line": 101, - "column": 9 - } - } - }, - "startTag": { - "type": "SvelteStartTag", - "attributes": [], - "selfClosing": false, - "range": [ - 1728, - 1734 - ], - "loc": { - "start": { - "line": 101, - "column": 4 - }, - "end": { - "line": 101, - "column": 10 - } - } - }, - "children": [ - { - "type": "SvelteMustacheTag", - "kind": "text", - "expression": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "comment", - "range": [ - 1735, - 1742 - ], - "loc": { - "start": { - "line": 101, - "column": 11 - }, - "end": { - "line": 101, - "column": 18 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "text", - "range": [ - 1743, - 1747 - ], - "loc": { - "start": { - "line": 101, - "column": 19 - }, - "end": { - "line": 101, - "column": 23 - } - } - }, - "range": [ - 1735, - 1747 - ], - "loc": { - "start": { - "line": 101, - "column": 11 - }, - "end": { - "line": 101, - "column": 23 - } - } - }, - "range": [ - 1734, - 1748 - ], - "loc": { - "start": { - "line": 101, - "column": 10 - }, - "end": { - "line": 101, - "column": 24 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1748, - 1755 - ], - "loc": { - "start": { - "line": 101, - "column": 24 - }, - "end": { - "line": 101, - "column": 31 - } - } - }, - "range": [ - 1728, - 1755 - ], - "loc": { - "start": { - "line": 101, - "column": 4 - }, - "end": { - "line": 101, - "column": 31 - } - } - }, - { - "type": "SvelteText", - "value": "\n\t\t\t", - "range": [ - 1755, - 1759 - ], - "loc": { - "start": { - "line": 101, - "column": 31 - }, - "end": { - "line": 102, - "column": 3 - } - } - } - ], - "endTag": { - "type": "SvelteEndTag", - "range": [ - 1759, - 1769 - ], - "loc": { - "start": { - "line": 102, - "column": 3 - }, - "end": { - "line": 102, - "column": 13 - } - } - }, - "range": [ - 1691, - 1769 - ], - "loc": { - "start": { - "line": 100, - "column": 3 - }, - "end": { - "line": 102, - "column": 13 - } - } - } - ], - "else": null, - "range": [ - 1660, - 1779 - ], - "loc": { - "start": { - "line": 99, - "column": 2 - }, - "end": { - "line": 103, - "column": 9 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comment", - "range": [ - 1707, - 1714 - ], - "loc": { - "start": { - "line": 100, - "column": 19 - }, - "end": { - "line": 100, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comment", - "range": [ - 1735, - 1742 - ], - "loc": { - "start": { - "line": 101, - "column": 11 - }, - "end": { - "line": 101, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "comment", - "range": [ - 1707, - 1714 - ], - "loc": { - "start": { - "line": 100, - "column": 19 - }, - "end": { - "line": 100, - "column": 26 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "comment", - "range": [ - 1735, - 1742 - ], - "loc": { - "start": { - "line": 101, - "column": 11 - }, - "end": { - "line": 101, - "column": 18 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "comment", - "range": [ - 1679, - 1686 - ], - "loc": { - "start": { - "line": 99, - "column": 21 - }, - "end": { - "line": 99, - "column": 28 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } - ] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 679, - 689 - ], - "loc": { - "start": { - "line": 36, - "column": 3 - }, - "end": { - "line": 36, - "column": 13 - } - } - }, - "from": "block", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "setTimeout", - "range": [ - 807, - 817 - ], - "loc": { - "start": { - "line": 43, - "column": 4 - }, - "end": { - "line": 43, - "column": 14 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 963, - 967 - ], - "loc": { - "start": { - "line": 48, - "column": 13 - }, - "end": { - "line": 48, - "column": 17 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "Math", - "range": [ - 997, - 1001 - ], - "loc": { - "start": { - "line": 49, - "column": 12 - }, - "end": { - "line": 49, - "column": 16 - } - } - }, - "from": "block", - "init": null, - "resolved": null - } ] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json index f708a62c..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,2276 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "numbers", - "identifiers": [ - { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "init": { - "type": "ArrayExpression", - "elements": [ - { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 25, - 26 - ], - "loc": { - "start": { - "line": 2, - "column": 16 - }, - "end": { - "line": 2, - "column": 17 - } - } - }, - { - "type": "Literal", - "raw": "2", - "value": 2, - "range": [ - 28, - 29 - ], - "loc": { - "start": { - "line": 2, - "column": 19 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - { - "type": "Literal", - "raw": "3", - "value": 3, - "range": [ - 31, - 32 - ], - "loc": { - "start": { - "line": 2, - "column": 22 - }, - "end": { - "line": 2, - "column": 23 - } - } - }, - { - "type": "Literal", - "raw": "4", - "value": 4, - "range": [ - 34, - 35 - ], - "loc": { - "start": { - "line": 2, - "column": 25 - }, - "end": { - "line": 2, - "column": 26 - } - } - } - ], - "range": [ - 24, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 15 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "range": [ - 14, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 27 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 65, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 78, - 85 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 111, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 134, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 185, - 192 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "name": "addNumber", - "identifiers": [ - { - "type": "Identifier", - "name": "addNumber", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "addNumber", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "BinaryExpression", - "left": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "numbers", - "range": [ - 78, - 85 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "length", - "range": [ - 86, - 92 - ], - "loc": { - "start": { - "line": 5, - "column": 23 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "range": [ - 78, - 92 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 95, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 32 - }, - "end": { - "line": 5, - "column": 33 - } - } - }, - "range": [ - 78, - 96 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 33 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "numbers", - "range": [ - 65, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "push", - "range": [ - 73, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 10 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 65, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 65, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 34 - } - } - }, - "range": [ - 65, - 98 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 35 - } - } - }, - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "numbers", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "numbers", - "range": [ - 111, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "range": [ - 101, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "range": [ - 101, - 119 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 20 - } - } - } - ], - "range": [ - 61, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 7, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "addNumber", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "params": [], - "range": [ - 40, - 122 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 7, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "addNumber", - "range": [ - 237, - 246 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "addNumber", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "sum", - "identifiers": [ - { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - } - ], - "defs": [ - { - "type": "ComputedVariable", - "name": { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "node": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "operator": "=", - "right": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "n", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 39 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - } - ], - "range": [ - 149, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 166, - 167 - ], - "loc": { - "start": { - "line": 9, - "column": 42 - }, - "end": { - "line": 9, - "column": 43 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "numbers", - "range": [ - 134, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "reduce", - "range": [ - 142, - 148 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "range": [ - 134, - 148 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 24 - } - } - }, - "optional": false, - "range": [ - 134, - 168 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 44 - } - } - }, - "range": [ - 128, - 168 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 44 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "sum", - "range": [ - 209, - 212 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 134, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 185, - 192 - ], - "loc": { - "start": { - "line": 12, - "column": 4 - }, - "end": { - "line": 12, - "column": 11 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "sum", - "range": [ - 209, - 212 - ], - "loc": { - "start": { - "line": 12, - "column": 28 - }, - "end": { - "line": 12, - "column": 31 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "sum", - "range": [ - 128, - 131 - ], - "loc": { - "start": { - "line": 9, - "column": 4 - }, - "end": { - "line": 9, - "column": 7 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "addNumber", - "range": [ - 237, - 246 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "addNumber", - "range": [ - 49, - 58 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 65, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 78, - 85 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 111, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 65, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 9 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 78, - 85 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 101, - 108 - ], - "loc": { - "start": { - "line": 6, - "column": 2 - }, - "end": { - "line": 6, - "column": 9 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "numbers", - "range": [ - 111, - 118 - ], - "loc": { - "start": { - "line": 6, - "column": 12 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "numbers", - "range": [ - 14, - 21 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 12 - } - } - } - } - ] - }, - { - "type": "function", - "variables": [ - { - "name": "t", - "identifiers": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "n", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 39 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - } - ], - "range": [ - 149, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - } - } - ] - }, - { - "name": "n", - "identifiers": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "t", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "operator": "+", - "right": { - "type": "Identifier", - "name": "n", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 39 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "range": [ - 159, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - } - ], - "range": [ - 149, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 25 - }, - "end": { - "line": 9, - "column": 40 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 39 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "t", - "range": [ - 159, - 160 - ], - "loc": { - "start": { - "line": 9, - "column": 35 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "t", - "range": [ - 150, - 151 - ], - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 163, - 164 - ], - "loc": { - "start": { - "line": 9, - "column": 39 - }, - "end": { - "line": 9, - "column": 40 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 153, - 154 - ], - "loc": { - "start": { - "line": 9, - "column": 29 - }, - "end": { - "line": 9, - "column": 30 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json index 23a92ab1..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1611 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "Incrementer", - "identifiers": [ - { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 333, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - } - ] - }, - { - "name": "Decrementer", - "identifiers": [ - { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 348, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - }, - { - "name": "Resetter", - "identifiers": [ - { - "type": "Identifier", - "name": "Resetter", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "node": { - "type": "ImportDefaultSpecifier", - "local": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 363, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ] - }, - { - "name": "count_value", - "identifiers": [ - { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - }, - "init": null, - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 258, - 269 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 313, - 324 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - } - ] - }, - { - "name": "unsubscribe", - "identifiers": [ - { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count_value", - "range": [ - 258, - 269 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "value", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "range": [ - 258, - 277 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "range": [ - 258, - 278 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "range": [ - 254, - 281 - ], - "loc": { - "start": { - "line": 9, - "column": 46 - }, - "end": { - "line": 11, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 245, - 250 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - } - ], - "range": [ - 245, - 281 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 11, - "column": 2 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "count", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "subscribe", - "range": [ - 235, - 244 - ], - "loc": { - "start": { - "line": 9, - "column": 27 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "range": [ - 229, - 244 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 36 - } - } - }, - "optional": false, - "range": [ - 229, - 282 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 11, - "column": 3 - } - } - }, - "range": [ - 215, - 282 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 11, - "column": 3 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "unsubscribe", - "range": [ - 215, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 7 - }, - "end": { - "line": 9, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 229, - 234 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 26 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 313, - 324 - ], - "loc": { - "start": { - "line": 14, - "column": 18 - }, - "end": { - "line": 14, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 333, - 344 - ], - "loc": { - "start": { - "line": 16, - "column": 1 - }, - "end": { - "line": 16, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Incrementer", - "range": [ - 55, - 66 - ], - "loc": { - "start": { - "line": 3, - "column": 8 - }, - "end": { - "line": 3, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 348, - 359 - ], - "loc": { - "start": { - "line": 17, - "column": 1 - }, - "end": { - "line": 17, - "column": 12 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Decrementer", - "range": [ - 104, - 115 - ], - "loc": { - "start": { - "line": 4, - "column": 8 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 363, - 371 - ], - "loc": { - "start": { - "line": 18, - "column": 1 - }, - "end": { - "line": 18, - "column": 9 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "Resetter", - "range": [ - 153, - 161 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "value", - "identifiers": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 245, - 250 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "value", - "range": [ - 245, - 250 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "AssignmentExpression", - "left": { - "type": "Identifier", - "name": "count_value", - "range": [ - 258, - 269 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "operator": "=", - "right": { - "type": "Identifier", - "name": "value", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "range": [ - 258, - 277 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "range": [ - 258, - 278 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 22 - } - } - } - ], - "range": [ - 254, - 281 - ], - "loc": { - "start": { - "line": 9, - "column": 46 - }, - "end": { - "line": 11, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "value", - "range": [ - 245, - 250 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - } - ], - "range": [ - 245, - 281 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 11, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 245, - 250 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 258, - 269 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "value", - "range": [ - 272, - 277 - ], - "loc": { - "start": { - "line": 10, - "column": 16 - }, - "end": { - "line": 10, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "value", - "range": [ - 245, - 250 - ], - "loc": { - "start": { - "line": 9, - "column": 37 - }, - "end": { - "line": 9, - "column": 42 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count_value", - "range": [ - 258, - 269 - ], - "loc": { - "start": { - "line": 10, - "column": 2 - }, - "end": { - "line": 10, - "column": 13 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "count_value", - "range": [ - 194, - 205 - ], - "loc": { - "start": { - "line": 7, - "column": 5 - }, - "end": { - "line": 7, - "column": 16 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json index 4fe41975..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,864 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "decrement", - "identifiers": [ - { - "type": "Identifier", - "name": "decrement", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "decrement", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 96, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "range": [ - 87, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "update", - "range": [ - 80, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 74, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 74, - 98 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 74, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 70, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "decrement", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "params": [], - "range": [ - 49, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "decrement", - "range": [ - 132, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "decrement", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "decrement", - "range": [ - 132, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "decrement", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "n", - "identifiers": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "operator": "-", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 96, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "range": [ - 87, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json index eef95c8d..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,864 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "increment", - "identifiers": [ - { - "type": "Identifier", - "name": "increment", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "increment", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 96, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "range": [ - 87, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "update", - "range": [ - 80, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 74, - 86 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "optional": false, - "range": [ - 74, - 98 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 26 - } - } - }, - "range": [ - 74, - 99 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 27 - } - } - } - ], - "range": [ - 70, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 22 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "increment", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "params": [], - "range": [ - 49, - 102 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "increment", - "range": [ - 132, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "increment", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "increment", - "range": [ - 132, - 141 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "increment", - "range": [ - 58, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 19 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "n", - "identifiers": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Parameter", - "name": { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - }, - "node": { - "type": "ArrowFunctionExpression", - "async": false, - "body": { - "type": "BinaryExpression", - "left": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "operator": "+", - "right": { - "type": "Literal", - "raw": "1", - "value": 1, - "range": [ - 96, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 24 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "range": [ - 92, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - "expression": true, - "generator": false, - "id": null, - "params": [ - { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - ], - "range": [ - 87, - 97 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 25 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "n", - "range": [ - 92, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 20 - }, - "end": { - "line": 5, - "column": 21 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "n", - "range": [ - 87, - 88 - ], - "loc": { - "start": { - "line": 5, - "column": 15 - }, - "end": { - "line": 5, - "column": 16 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 74, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json index fe3cfe5c..521634fa 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,553 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "count", - "identifiers": [ - { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "local": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - }, - { - "name": "reset", - "identifiers": [ - { - "type": "Identifier", - "name": "reset", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "FunctionName", - "name": { - "type": "Identifier", - "name": "reset", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "node": { - "type": "FunctionDeclaration", - "async": false, - "body": { - "type": "BlockStatement", - "body": [ - { - "type": "ExpressionStatement", - "expression": { - "type": "CallExpression", - "arguments": [ - { - "type": "Literal", - "raw": "0", - "value": 0, - "range": [ - 80, - 81 - ], - "loc": { - "start": { - "line": 5, - "column": 12 - }, - "end": { - "line": 5, - "column": 13 - } - } - } - ], - "callee": { - "type": "MemberExpression", - "computed": false, - "object": { - "type": "Identifier", - "name": "count", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "optional": false, - "property": { - "type": "Identifier", - "name": "set", - "range": [ - 76, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 8 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "range": [ - 70, - 79 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 11 - } - } - }, - "optional": false, - "range": [ - 70, - 82 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 14 - } - } - }, - "range": [ - 70, - 83 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "range": [ - 66, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 18 - }, - "end": { - "line": 6, - "column": 2 - } - } - }, - "expression": false, - "generator": false, - "id": { - "type": "Identifier", - "name": "reset", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "params": [], - "range": [ - 49, - 86 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 6, - "column": 2 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "reset", - "range": [ - 116, - 121 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "reset", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "reset", - "range": [ - 116, - 121 - ], - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 23 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "reset", - "range": [ - 58, - 63 - ], - "loc": { - "start": { - "line": 4, - "column": 10 - }, - "end": { - "line": 4, - "column": 15 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [ - { - "name": "arguments", - "identifiers": [], - "defs": [], - "references": [] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "count", - "range": [ - 70, - 75 - ], - "loc": { - "start": { - "line": 5, - "column": 2 - }, - "end": { - "line": 5, - "column": 7 - } - } - }, - "from": "function", - "init": null, - "resolved": { - "type": "Identifier", - "name": "count", - "range": [ - 19, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 15 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json index e469cab1..521634fa 100644 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,462 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "foo", - "identifiers": [ - { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 20, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 11 - }, - "end": { - "line": 2, - "column": 16 - } - } - }, - "range": [ - 14, - 25 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - } - ] - }, - { - "name": "bar", - "identifiers": [ - { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "init": { - "type": "Literal", - "raw": "false", - "value": false, - "range": [ - 38, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 11 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "range": [ - 32, - 43 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "foo", - "range": [ - 14, - 17 - ], - "loc": { - "start": { - "line": 2, - "column": 5 - }, - "end": { - "line": 2, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "bar", - "range": [ - 69, - 72 - ], - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 17 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "bar", - "range": [ - 32, - 35 - ], - "loc": { - "start": { - "line": 3, - "column": 5 - }, - "end": { - "line": 3, - "column": 8 - } - } - } - } - ], - "childScopes": [], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json index af2faece..521634fa 100644 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json @@ -1,5 +1,4 @@ { - "type": "global", "variables": [ { "name": "$$slots", @@ -49,1270 +48,5 @@ "defs": [], "references": [] } - ], - "references": [], - "childScopes": [ - { - "type": "module", - "variables": [ - { - "name": "imported", - "identifiers": [ - { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "local": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$imported", - "range": [ - 160, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$imported", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$imported", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - }, - { - "name": "createStore", - "identifiers": [ - { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - ], - "defs": [ - { - "type": "ImportBinding", - "name": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "node": { - "type": "ImportSpecifier", - "imported": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "local": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - }, - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "createStore", - "range": [ - 81, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createStore", - "range": [ - 132, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - } - ] - }, - { - "name": "writeOnly", - "identifiers": [ - { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createStore", - "range": [ - 81, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "optional": false, - "range": [ - 81, - 94 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 32 - } - } - }, - "range": [ - 69, - 94 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 32 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$writeOnly", - "range": [ - 97, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - } - ] - }, - { - "name": "readOnly", - "identifiers": [ - { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - ], - "defs": [ - { - "type": "Variable", - "name": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "node": { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "init": { - "type": "CallExpression", - "arguments": [], - "callee": { - "type": "Identifier", - "name": "createStore", - "range": [ - 132, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "optional": false, - "range": [ - 132, - 145 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 31 - } - } - }, - "range": [ - 121, - 145 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 31 - } - } - } - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$readOnly", - "range": [ - 148, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - } - ] - } - ], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createStore", - "range": [ - 81, - 92 - ], - "loc": { - "start": { - "line": 3, - "column": 19 - }, - "end": { - "line": 3, - "column": 30 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$writeOnly", - "range": [ - 97, - 107 - ], - "loc": { - "start": { - "line": 4, - "column": 1 - }, - "end": { - "line": 4, - "column": 11 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "writeOnly", - "range": [ - 69, - 78 - ], - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 16 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": true, - "resolved": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "createStore", - "range": [ - 132, - 143 - ], - "loc": { - "start": { - "line": 5, - "column": 18 - }, - "end": { - "line": 5, - "column": 29 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "createStore", - "range": [ - 29, - 40 - ], - "loc": { - "start": { - "line": 2, - "column": 20 - }, - "end": { - "line": 2, - "column": 31 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$readOnly", - "range": [ - 148, - 157 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 10 - } - } - }, - "from": "module", - "init": null, - "resolved": { - "type": "Identifier", - "name": "readOnly", - "range": [ - 121, - 129 - ], - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 15 - } - } - } - }, - { - "identifier": { - "type": "Identifier", - "name": "$imported", - "range": [ - 160, - 169 - ], - "loc": { - "start": { - "line": 7, - "column": 1 - }, - "end": { - "line": 7, - "column": 10 - } - } - }, - "from": "module", - "init": false, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [ - { - "type": "function", - "variables": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$imported", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ], - "childScopes": [], - "through": [ - { - "identifier": { - "type": "Identifier", - "name": "$imported", - "range": [ - 217, - 226 - ], - "loc": { - "start": { - "line": 9, - "column": 21 - }, - "end": { - "line": 9, - "column": 30 - } - } - }, - "from": "function", - "init": false, - "resolved": { - "type": "Identifier", - "name": "imported", - "range": [ - 19, - 27 - ], - "loc": { - "start": { - "line": 2, - "column": 10 - }, - "end": { - "line": 2, - "column": 18 - } - } - } - } - ] - } - ], - "through": [] - } - ], - "through": [] -} \ No newline at end of file + ] +} diff --git a/tests/src/parser/parser.ts b/tests/src/parser/parser.ts index 5459cbf2..8e1057cc 100644 --- a/tests/src/parser/parser.ts +++ b/tests/src/parser/parser.ts @@ -2,6 +2,7 @@ import assert from "assert"; import fs from "fs"; import semver from "semver"; +import { VERSION as SVELTE_VERSION } from "svelte/compiler"; import { traverseNodes } from "../../../src/traverse"; import { parseForESLint } from "../../../src"; @@ -23,13 +24,18 @@ describe("Check for AST.", () => { input, inputFileName, outputFileName, - scopeFileName, + scopeFile, config, meetRequirements, } of listupFixtures()) { if (!meetRequirements("parse")) { continue; } + const isSvelte5Only = inputFileName.includes("/svelte5/"); + if (isSvelte5Only && !SVELTE_VERSION.startsWith("5")) { + continue; + } + describe(inputFileName, () => { let result: any; @@ -45,7 +51,7 @@ describe("Check for AST.", () => { if (meetRequirements("scope")) it("most to generate the expected scope.", () => { let json: any = scopeToJSON(result.scopeManager); - let output: any = fs.readFileSync(scopeFileName, "utf8"); + let output: any = scopeFile; if ( result.services?.program // use ts parser diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 36b97c96..3b0f8481 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -34,7 +34,7 @@ export function* listupFixtures(dir?: string): Iterable<{ input: string; inputFileName: string; outputFileName: string; - scopeFileName: string; + scopeFile: string | null; typeFileName: string | null; config: Linter.ParserOptions; requirements: { @@ -46,11 +46,46 @@ export function* listupFixtures(dir?: string): Iterable<{ yield* listupFixturesImpl(dir || AST_FIXTURE_ROOT); } +function getScopeFile(inputFileName: string) { + const scopeFileName = inputFileName.replace( + /input\.svelte$/u, + "scope-output.json", + ); + if (!fs.existsSync(scopeFileName)) return null; + const scopeFile = fs.readFileSync(scopeFileName, "utf8"); + if (!SVELTE_VERSION.startsWith("5")) { + return scopeFile; + } + + const scopeFileNameSvelte5 = inputFileName.replace( + /input\.svelte$/u, + "scope-output-svelte5.json", + ); + if (!fs.existsSync(scopeFileNameSvelte5)) return scopeFile; + + const scopeFileSvelte5 = fs.readFileSync(scopeFileNameSvelte5, "utf8"); + const scopeFileJson = JSON.parse(scopeFile); + const scopeFileSvelte5Json = JSON.parse(scopeFileSvelte5); + + for (const key of Object.keys(scopeFileJson)) { + if (scopeFileSvelte5Json[key]) { + scopeFileJson[key] = scopeFileSvelte5Json[key]; + } + } + for (const key of Object.keys(scopeFileSvelte5Json)) { + if (!scopeFileJson[key]) { + scopeFileJson[key] = scopeFileSvelte5Json[key]; + } + } + + return JSON.stringify(scopeFileJson, null, 2); +} + function* listupFixturesImpl(dir: string): Iterable<{ input: string; inputFileName: string; outputFileName: string; - scopeFileName: string; + scopeFile: string | null; typeFileName: string | null; config: Linter.ParserOptions; requirements: { @@ -66,9 +101,6 @@ function* listupFixturesImpl(dir: string): Iterable<{ /input\.svelte$/u, "output.json", ); - const scopeFileName = SVELTE_VERSION.startsWith("5") - ? inputFileName.replace(/input\.svelte$/u, "scope-output-svelte5.json") - : inputFileName.replace(/input\.svelte$/u, "scope-output.json"); const typeFileName = inputFileName.replace( /input\.svelte$/u, "type-output.svelte", @@ -93,7 +125,7 @@ function* listupFixturesImpl(dir: string): Iterable<{ input, inputFileName, outputFileName, - scopeFileName, + scopeFile: getScopeFile(inputFileName), typeFileName: fs.existsSync(typeFileName) ? typeFileName : null, config, requirements, From ab28e8eba16d1518b21561a70b8bc88f89db6e84 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:10:55 +0900 Subject: [PATCH 10/27] fix test --- .../parser/ast/$$slots-scope-output.json | 30 +++ .../parser/ast/$var-scope-output.json | 30 +++ ...const01-within-component-scope-output.json | 30 +++ .../parser/ast/attr01-scope-output.json | 30 +++ .../parser/ast/await01-scope-output.json | 30 +++ .../parser/ast/await02-scope-output.json | 30 +++ .../parser/ast/await04-scope-output.json | 30 +++ .../blog/write-less-code01-scope-output.json | 30 +++ .../ast/class-directive01-scope-output.json | 30 +++ .../parser/ast/comments01-scope-output.json | 30 +++ .../parser/ast/components01-scope-output.json | 30 +++ .../parser/ast/components02-scope-output.json | 30 +++ .../parser/ast/components03-scope-output.json | 30 +++ .../parser/ast/components04-scope-output.json | 30 +++ ...ective-on-with-expr-like-scope-output.json | 30 +++ .../directive-use-with-expr-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../02-scope-output.json | 30 +++ .../03-scope-output.json | 30 +++ .../04-scope-output.json | 30 +++ .../05-scope-output.json | 30 +++ .../06-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../02-scope-output.json | 30 +++ .../03-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../03-style/01-scope-output.json | 30 +++ .../03-style/02-scope-output.json | 30 +++ .../03-style/03-scope-output.json | 30 +++ .../03-style/04-scope-output.json | 30 +++ .../01-tags/01-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../02-scope-output.json | 30 +++ .../03-scope-output.json | 30 +++ .../04-scope-output.json | 30 +++ .../05-scope-output.json | 30 +++ .../06-scope-output.json | 30 +++ .../07-scope-output.json | 30 +++ .../08-scope-output.json | 30 +++ .../09-scope-output.json | 30 +++ .../10-scope-output.json | 30 +++ .../11-scope-output.json | 30 +++ .../03-text-expressions/01-scope-output.json | 30 +++ .../03-text-expressions/02-scope-output.json | 30 +++ .../04-comments/01-scope-output.json | 30 +++ .../04-comments/02-scope-output.json | 30 +++ .../05-hash-if/01-scope-output.json | 30 +++ .../05-hash-if/02-scope-output.json | 30 +++ .../05-hash-if/03-scope-output.json | 30 +++ .../06-hash-each/01-scope-output.json | 30 +++ .../06-hash-each/02-scope-output.json | 30 +++ .../06-hash-each/03-scope-output.json | 30 +++ .../06-hash-each/04-scope-output.json | 30 +++ .../06-hash-each/05-scope-output.json | 30 +++ .../06-hash-each/06-scope-output.json | 30 +++ .../07-hash-await/01-scope-output.json | 30 +++ .../07-hash-await/02-scope-output.json | 30 +++ .../07-hash-await/03-scope-output.json | 30 +++ .../07-hash-await/04-scope-output.json | 30 +++ .../07-hash-await/05-scope-output.json | 30 +++ .../08-hash-key/01-scope-output.json | 30 +++ .../08-hash-key/02-scope-output.json | 30 +++ .../08-hash-key/03-scope-output.json | 30 +++ .../09-at-html/01-scope-output.json | 30 +++ .../09-at-html/02-scope-output.json | 30 +++ .../10-at-debug/01-scope-output.json | 30 +++ .../10-at-debug/02-scope-output.json | 30 +++ .../10-at-debug/03-scope-output.json | 30 +++ .../10.1-at-const/01-scope-output.json | 30 +++ .../10.1-at-const/02-scope-output.json | 30 +++ .../01-on-eventname/01-scope-output.json | 30 +++ .../01-on-eventname/02-scope-output.json | 30 +++ .../01-on-eventname/03-scope-output.json | 30 +++ .../01-on-eventname/04-scope-output.json | 30 +++ .../01-on-eventname/05-scope-output.json | 30 +++ .../01-on-eventname/06-scope-output.json | 30 +++ .../02-bind-property/01-scope-output.json | 30 +++ .../02-bind-property/02-scope-output.json | 30 +++ .../02-bind-property/03-scope-output.json | 30 +++ .../02-bind-property/04-scope-output.json | 30 +++ .../02-bind-property/05-scope-output.json | 30 +++ .../02-bind-property/06-scope-output.json | 30 +++ .../02-bind-property/07-scope-output.json | 30 +++ .../02-bind-property/08-scope-output.json | 30 +++ .../02-bind-property/09-scope-output.json | 30 +++ .../02-bind-property/10-scope-output.json | 30 +++ .../02-bind-property/11-scope-output.json | 30 +++ .../03-bind-group/01-scope-output.json | 30 +++ .../03-bind-group/02-scope-output.json | 30 +++ .../04-bind-this/01-scope-output.json | 30 +++ .../04-bind-this/02-scope-output.json | 30 +++ .../05-class-name/01-scope-output.json | 30 +++ .../05-class-name/02-scope-output.json | 30 +++ .../05.1-style-property/01-scope-output.json | 30 +++ .../05.1-style-property/02-scope-output.json | 30 +++ .../02.1-scope-output.json | 30 +++ .../05.1-style-property/03-scope-output.json | 30 +++ .../06-use-action/01-scope-output.json | 30 +++ .../06-use-action/02-scope-output.json | 30 +++ .../06-use-action/03-scope-output.json | 30 +++ .../07-transition-fn/01-scope-output.json | 30 +++ .../07-transition-fn/02-scope-output.json | 30 +++ .../07-transition-fn/03-scope-output.json | 30 +++ .../07-transition-fn/04-scope-output.json | 30 +++ .../07-transition-fn/05-scope-output.json | 30 +++ .../07-transition-fn/05-ts-scope-output.json | 30 +++ .../07-transition-fn/06-scope-output.json | 30 +++ .../07-transition-fn/07-scope-output.json | 30 +++ .../08-in-fn-out-fn/01-scope-output.json | 30 +++ .../08-in-fn-out-fn/02-scope-output.json | 30 +++ .../09-animate-fn/01-scope-output.json | 30 +++ .../09-animate-fn/02-scope-output.json | 30 +++ .../09-animate-fn/03-scope-output.json | 30 +++ .../09-animate-fn/04-scope-output.json | 30 +++ .../09-animate-fn/05-scope-output.json | 30 +++ .../01-on-eventname/01-scope-output.json | 30 +++ .../01-on-eventname/02-scope-output.json | 30 +++ .../01-on-eventname/03-scope-output.json | 30 +++ .../02-style-props/01-scope-output.json | 30 +++ .../02-style-props/02-scope-output.json | 30 +++ .../02-style-props/03-scope-output.json | 30 +++ .../03-bind-property/01-scope-output.json | 30 +++ .../03-bind-property/02-scope-output.json | 30 +++ .../04-bind-this/01-scope-output.json | 30 +++ .../04-bind-this/02-scope-output.json | 30 +++ .../13-slot/00/01-scope-output.json | 30 +++ .../13-slot/00/02-scope-output.json | 30 +++ .../01-slot-name-name/01-scope-output.json | 30 +++ .../01-slot-name-name/02-scope-output.json | 30 +++ .../13-slot/02-$$slots/01-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../02-scope-output.json | 30 +++ .../14-svelte-self/01-scope-output.json | 30 +++ .../01-scope-output.json | 30 +++ .../02-scope-output.json | 30 +++ .../15_2-svelte-element/01-scope-output.json | 30 +++ .../15_2-svelte-element/02-scope-output.json | 30 +++ .../16_1-svelte-window/01-scope-output.json | 30 +++ .../16_1-svelte-window/02-scope-output.json | 30 +++ .../16_1-svelte-window/03-scope-output.json | 30 +++ .../16_1-svelte-window/04-scope-output.json | 30 +++ .../16_2-svelte-document/01-scope-output.json | 30 +++ .../16_2-svelte-document/02-scope-output.json | 30 +++ .../17-svelte-body/01-scope-output.json | 30 +++ .../17-svelte-body/02-scope-output.json | 30 +++ .../18-svelte-head/01-scope-output.json | 30 +++ .../18-svelte-head/02-scope-output.json | 30 +++ .../19-svelte-options/02-scope-output.json | 30 +++ .../20-svelte-fragment/01-scope-output.json | 30 +++ .../ast/each-with-comment-scope-output.json | 30 +++ .../ast/empty-elements01-scope-output.json | 30 +++ .../ast/hello/hello-world01-scope-output.json | 30 +++ .../ast/hello/hello-world02-scope-output.json | 30 +++ .../ast/hello/hello-world03-scope-output.json | 30 +++ .../ast/hello/hello-world04-scope-output.json | 30 +++ .../ast/hello/hello-world05-scope-output.json | 30 +++ .../ast/html-comments01-scope-output.json | 30 +++ .../parser/ast/i18n-test-scope-output.json | 30 +++ .../illegal/dot-in-bind01-scope-output.json | 30 +++ ...325-eslint-plugin-svelte-scope-output.json | 30 +++ ...327-eslint-plugin-svelte-scope-output.json | 30 +++ ...338-eslint-plugin-svelte-scope-output.json | 30 +++ .../ast/kit-demo-home-scope-output.json | 30 +++ .../parser/ast/label01-scope-output.json | 30 +++ .../ast/let-directive01-scope-output.json | 30 +++ .../ast/let-directive02-scope-output.json | 30 +++ .../ast/let-directive03-scope-output.json | 30 +++ .../ast/let-directive04-scope-output.json | 30 +++ .../mustache-with-comment-scope-output.json | 30 +++ .../nesting-script-tag01-scope-output.json | 30 +++ .../parser/ast/props01-scope-output.json | 30 +++ .../parser/ast/props02-scope-output.json | 30 +++ .../parser/ast/props03-scope-output.json | 30 +++ .../parser/ast/props04-scope-output.json | 30 +++ .../ast/pug/each/each01-scope-output.json | 30 +++ .../self-closing-template-scope-output.json | 30 +++ ...tions-with-destructure01-scope-output.json | 30 +++ ...tions-with-destructure02-scope-output.json | 30 +++ ...tions-with-destructure03-scope-output.json | 30 +++ ...tions-with-destructure04-scope-output.json | 30 +++ ...tions-with-destructure05-scope-output.json | 30 +++ .../reactive-with-store01-scope-output.json | 30 +++ .../reactive-with-store02-scope-output.json | 30 +++ .../ast/reactive-with-var01-scope-output.json | 30 +++ .../ast/reactive-with-var02-scope-output.json | 30 +++ .../ast/reactive-with-var03-scope-output.json | 30 +++ .../reactive-with-var04-ts-scope-output.json | 30 +++ .../parser/ast/sass-scope-output.json | 30 +++ .../ast/script-in-style-scope-output.json | 30 +++ .../parser/ast/script-tag-scope-output.json | 30 +++ .../self-closing-style01-scope-output.json | 30 +++ .../ast/store-bindings-scope-output.json | 30 +++ .../ast/style-directive01-scope-output.json | 30 +++ .../ast/style-directive02-scope-output.json | 30 +++ .../ast/style-directive03-scope-output.json | 30 +++ .../ast/style-global01-scope-output.json | 30 +++ .../ast/style-global02-scope-output.json | 30 +++ .../ast/style-in-script-scope-output.json | 30 +++ .../parser/ast/style01-scope-output.json | 30 +++ .../parser/ast/style02-scope-output.json | 30 +++ ...e-element-with-bind-this-scope-output.json | 30 +++ .../ast/svelte5/ts-$state01-scope-output.json | 219 ++++++++++++++---- ...plate-curly-spacing-test-scope-output.json | 30 +++ .../parser/ast/this-attr01-scope-output.json | 30 +++ .../parser/ast/this-attr02-scope-output.json | 30 +++ .../parser/ast/this-attr03-scope-output.json | 30 +++ .../parser/ast/this-attr04-scope-output.json | 30 +++ .../parser/ast/this-attr05-scope-output.json | 30 +++ .../ast/trailing-comment01-scope-output.json | 30 +++ .../parser/ast/ts-$$props01-scope-output.json | 30 +++ .../parser/ast/ts-$$slots01-scope-output.json | 30 +++ .../ts-$$slots02-no-slot-scope-output.json | 30 +++ .../ast/ts-$$slots03-named-scope-output.json | 30 +++ .../ast/ts-$$slots04-named-scope-output.json | 30 +++ .../ts-await-non-promise01-scope-output.json | 30 +++ .../parser/ast/ts-each01-scope-output.json | 30 +++ .../parser/ast/ts-event01-scope-output.json | 30 +++ .../parser/ast/ts-event02-scope-output.json | 30 +++ .../parser/ast/ts-event03-scope-output.json | 30 +++ .../parser/ast/ts-event04-scope-output.json | 30 +++ .../parser/ast/ts-event05-scope-output.json | 30 +++ .../parser/ast/ts-event06-scope-output.json | 30 +++ .../parser/ast/ts-issue226-scope-output.json | 30 +++ .../ast/ts-let/ts-let01-scope-output.json | 30 +++ .../parser/ast/ts-newline-scope-output.json | 30 +++ .../ast/ts-not-reactive01-scope-output.json | 30 +++ .../parser/ast/ts-promise01-scope-output.json | 30 +++ .../parser/ast/ts-promise02-scope-output.json | 30 +++ .../ast/ts-reactive01-scope-output.json | 30 +++ .../ast/ts-reactive02-scope-output.json | 30 +++ .../ast/ts-reactive03-scope-output.json | 30 +++ .../ast/ts-reactive04-scope-output.json | 30 +++ .../ast/ts-reactive05-scope-output.json | 30 +++ .../ast/ts-reactive06-scope-output.json | 30 +++ .../ast/ts-scope-issue01-scope-output.json | 30 +++ .../ast/ts-shorthand-attr01-scope-output.json | 30 +++ .../parser/ast/ts-store01-scope-output.json | 30 +++ .../parser/ast/ts-store02-scope-output.json | 30 +++ .../parser/ast/ts-store03-scope-output.json | 30 +++ .../parser/ast/ts-use01-scope-output.json | 30 +++ .../ast/tutorial/actions-scope-output.json | 30 +++ .../tutorial/adding-data-scope-output.json | 30 +++ ...ng-parameters-to-actions-scope-output.json | 30 +++ ...arameters-to-transitions-scope-output.json | 30 +++ .../ast/tutorial/animate-scope-output.json | 30 +++ .../auto-subscriptions01-scope-output.json | 30 +++ .../tutorial/await-blocks-scope-output.json | 30 +++ .../ast/tutorial/basics-scope-output.json | 30 +++ .../ast/tutorial/bind-this-scope-output.json | 30 +++ .../checkbox-inputs-scope-output.json | 30 +++ .../class-shorthand-scope-output.json | 30 +++ .../ast/tutorial/classes-scope-output.json | 30 +++ .../component-bindings01-scope-output.json | 30 +++ .../component-bindings02-scope-output.json | 30 +++ .../component-events01-scope-output.json | 30 +++ .../component-events02-scope-output.json | 30 +++ .../congratulations-scope-output.json | 30 +++ ...contenteditable-bindings-scope-output.json | 30 +++ .../tutorial/context-api01-scope-output.json | 30 +++ .../tutorial/context-api02-scope-output.json | 30 +++ .../tutorial/context-api03-scope-output.json | 30 +++ ...custom-css-transitions01-scope-output.json | 30 +++ ...custom-css-transitions02-scope-output.json | 30 +++ .../custom-js-transitions-scope-output.json | 30 +++ .../tutorial/custom-stores-scope-output.json | 30 +++ .../ast/tutorial/debug01-scope-output.json | 30 +++ .../ast/tutorial/debug02-scope-output.json | 30 +++ .../declaring-props01-scope-output.json | 30 +++ .../declaring-props02-scope-output.json | 30 +++ .../default-values01-scope-output.json | 30 +++ .../default-values02-scope-output.json | 30 +++ .../deferred-transitions-scope-output.json | 30 +++ .../tutorial/derived-stores-scope-output.json | 30 +++ .../ast/tutorial/dimensions-scope-output.json | 30 +++ .../dom-event-forwarding01-scope-output.json | 30 +++ .../dom-event-forwarding02-scope-output.json | 30 +++ .../ast/tutorial/dom-events-scope-output.json | 30 +++ .../dynamic-attributes-scope-output.json | 30 +++ .../each-block-bindings-scope-output.json | 30 +++ .../tutorial/each-blocks01-scope-output.json | 30 +++ .../tutorial/each-blocks02-scope-output.json | 30 +++ .../tutorial/else-blocks-scope-output.json | 30 +++ .../else-if-blocks01-scope-output.json | 30 +++ .../else-if-blocks02-scope-output.json | 30 +++ .../event-forwarding01-scope-output.json | 30 +++ .../event-forwarding02-scope-output.json | 30 +++ .../event-forwarding03-scope-output.json | 30 +++ .../event-forwarding04-scope-output.json | 30 +++ .../event-modifiers-scope-output.json | 30 +++ .../tutorial/group-inputs-scope-output.json | 30 +++ .../tutorial/html-tags01-scope-output.json | 30 +++ .../tutorial/html-tags02-scope-output.json | 30 +++ .../ast/tutorial/if-blocks-scope-output.json | 30 +++ .../ast/tutorial/in-and-out-scope-output.json | 30 +++ .../inline-handlers-scope-output.json | 30 +++ .../keyed-each-blocks-scope-output.json | 30 +++ .../local-transitions-scope-output.json | 30 +++ .../tutorial/media-elements-scope-output.json | 30 +++ .../module-exports01-scope-output.json | 30 +++ .../module-exports02-scope-output.json | 30 +++ ...multiple-select-bindings-scope-output.json | 30 +++ .../tutorial/named-slots01-scope-output.json | 30 +++ .../tutorial/named-slots02-scope-output.json | 30 +++ .../nested-components01-scope-output.json | 30 +++ .../nested-components02-scope-output.json | 30 +++ .../numeric-inputs01-scope-output.json | 30 +++ .../numeric-inputs02-scope-output.json | 30 +++ .../ast/tutorial/ondestroy-scope-output.json | 30 +++ .../ast/tutorial/onmount-scope-output.json | 30 +++ .../optional-slots01-scope-output.json | 30 +++ .../optional-slots02-scope-output.json | 30 +++ .../optional-slots03-scope-output.json | 30 +++ .../reactive-assignments-scope-output.json | 30 +++ .../reactive-declarations-scope-output.json | 30 +++ .../reactive-statements-scope-output.json | 30 +++ .../readable-stores-scope-output.json | 30 +++ .../select-bindings-scope-output.json | 30 +++ .../tutorial/sharing-code01-scope-output.json | 30 +++ .../tutorial/sharing-code02-scope-output.json | 30 +++ .../slot-fallbacks01-scope-output.json | 30 +++ .../slot-fallbacks02-scope-output.json | 30 +++ .../tutorial/slot-props01-scope-output.json | 30 +++ .../tutorial/slot-props02-scope-output.json | 30 +++ .../tutorial/slot-props03-scope-output.json | 30 +++ .../ast/tutorial/slots01-scope-output.json | 30 +++ .../ast/tutorial/slots02-scope-output.json | 30 +++ .../tutorial/spread-props01-scope-output.json | 30 +++ .../tutorial/spread-props02-scope-output.json | 30 +++ .../tutorial/spread-props03-scope-output.json | 30 +++ .../ast/tutorial/spring-scope-output.json | 30 +++ .../ast/tutorial/styling01-scope-output.json | 30 +++ .../ast/tutorial/styling02-scope-output.json | 30 +++ .../tutorial/svelte-body-scope-output.json | 30 +++ .../svelte-component-scope-output.json | 30 +++ .../svelte-document-scope-output.json | 30 +++ .../tutorial/svelte-element-scope-output.json | 30 +++ .../svelte-fragment-scope-output.json | 30 +++ .../tutorial/svelte-head-scope-output.json | 30 +++ .../svelte-options01-scope-output.json | 30 +++ .../svelte-options02-scope-output.json | 30 +++ .../svelte-options03-scope-output.json | 30 +++ .../tutorial/svelte-self01-scope-output.json | 30 +++ .../tutorial/svelte-self02-scope-output.json | 30 +++ .../tutorial/svelte-self03-scope-output.json | 30 +++ .../svelte-window-bindings-scope-output.json | 30 +++ .../tutorial/svelte-window-scope-output.json | 30 +++ .../tutorial/text-inputs01-scope-output.json | 30 +++ .../tutorial/text-inputs02-scope-output.json | 30 +++ .../textarea-inputs-scope-output.json | 30 +++ .../ast/tutorial/tick-scope-output.json | 30 +++ .../transition-events-scope-output.json | 30 +++ .../ast/tutorial/transition-scope-output.json | 30 +++ .../ast/tutorial/tweened-scope-output.json | 30 +++ .../ast/tutorial/update-scope-output.json | 30 +++ ...ating-arrays-and-objects-scope-output.json | 30 +++ .../writable-stores01-scope-output.json | 30 +++ .../writable-stores02-scope-output.json | 30 +++ .../writable-stores03-scope-output.json | 30 +++ .../writable-stores04-scope-output.json | 30 +++ .../ast/unknown-directive01-scope-output.json | 30 +++ .../unused-write-only-store-scope-output.json | 30 +++ tests/src/parser/parser.ts | 9 +- tests/src/parser/test-utils.ts | 19 +- 365 files changed, 11054 insertions(+), 53 deletions(-) diff --git a/tests/fixtures/parser/ast/$$slots-scope-output.json b/tests/fixtures/parser/ast/$$slots-scope-output.json index 8aa15e1c..673549f1 100644 --- a/tests/fixtures/parser/ast/$$slots-scope-output.json +++ b/tests/fixtures/parser/ast/$$slots-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/$var-scope-output.json b/tests/fixtures/parser/ast/$var-scope-output.json index 13a91319..52f7b07a 100644 --- a/tests/fixtures/parser/ast/$var-scope-output.json +++ b/tests/fixtures/parser/ast/$var-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json index 160b8416..c8ae6c38 100644 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/attr01-scope-output.json b/tests/fixtures/parser/ast/attr01-scope-output.json index 4f004ffa..c3dbd581 100644 --- a/tests/fixtures/parser/ast/attr01-scope-output.json +++ b/tests/fixtures/parser/ast/attr01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await01-scope-output.json b/tests/fixtures/parser/ast/await01-scope-output.json index b170929d..c0f0ebe9 100644 --- a/tests/fixtures/parser/ast/await01-scope-output.json +++ b/tests/fixtures/parser/ast/await01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await02-scope-output.json b/tests/fixtures/parser/ast/await02-scope-output.json index 6704dac2..0bc4c394 100644 --- a/tests/fixtures/parser/ast/await02-scope-output.json +++ b/tests/fixtures/parser/ast/await02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await04-scope-output.json b/tests/fixtures/parser/ast/await04-scope-output.json index e57c558c..06b96b88 100644 --- a/tests/fixtures/parser/ast/await04-scope-output.json +++ b/tests/fixtures/parser/ast/await04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json index c584f6b7..ba15bda3 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output.json b/tests/fixtures/parser/ast/class-directive01-scope-output.json index 75d70de4..13050424 100644 --- a/tests/fixtures/parser/ast/class-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/class-directive01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/comments01-scope-output.json b/tests/fixtures/parser/ast/comments01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/comments01-scope-output.json +++ b/tests/fixtures/parser/ast/comments01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components01-scope-output.json b/tests/fixtures/parser/ast/components01-scope-output.json index 17e5e2d9..2a0a2128 100644 --- a/tests/fixtures/parser/ast/components01-scope-output.json +++ b/tests/fixtures/parser/ast/components01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components02-scope-output.json b/tests/fixtures/parser/ast/components02-scope-output.json index 17e5e2d9..2a0a2128 100644 --- a/tests/fixtures/parser/ast/components02-scope-output.json +++ b/tests/fixtures/parser/ast/components02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components03-scope-output.json b/tests/fixtures/parser/ast/components03-scope-output.json index 91f06b95..ab70be02 100644 --- a/tests/fixtures/parser/ast/components03-scope-output.json +++ b/tests/fixtures/parser/ast/components03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components04-scope-output.json b/tests/fixtures/parser/ast/components04-scope-output.json index f00b0217..8f4748e9 100644 --- a/tests/fixtures/parser/ast/components04-scope-output.json +++ b/tests/fixtures/parser/ast/components04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json index 4547a110..12225d9c 100644 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json index b8a8cfb5..d87484c5 100644 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json index 8aa93825..eff63b2b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json index c694e3f0..527cf046 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json index f064f431..45cb227d 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json index abb9fc00..c3551a31 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json index abb9fc00..c3551a31 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json index ef8a2d57..af23cc7d 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json index 2c8006cb..96844bfb 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json index 3cdcc951..b403e0ef 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json index c8e221c7..bfd7f5e3 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json index dfaf5a6f..d03ae69e 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json index 3ee5c6eb..fcbbbf3e 100644 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json index 0f9803a2..c6a1ab3d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json index 77293f06..807785b8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json index 5b3e5d75..bc595ac7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json index 78ba1afa..f843bd67 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json index 6feba977..bd4f854a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json index 977fab12..1e760ff1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json index 73592d5d..b0f85e07 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json index 39dcd8a3..2d300aae 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json index 781f2bad..d567849b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json @@ -42,6 +42,36 @@ "resolved": null } ] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json index 73d599b9..c1e4bc99 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json index ba08f3d0..da7e42dd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json index ee12a1ef..b83b22e8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json index be8c1387..7d20324d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json index 6e5bedff..ff0added 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json index 23b52e16..6b7932b4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json index 4cf23501..eb7001f1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json index 199d1d2d..0806d4b7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json index 567b593c..260f6771 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json index 2ff71892..86f54016 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json index fc368aa3..b39fa326 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json index eeed2e9d..70a353d3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json index af9742f9..90e63b27 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json index 75a0e1ef..410df4db 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json index 737039cd..4e6a8f05 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json index bae39a01..74c28fa9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json index 494496fd..6eb86596 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json index 35082588..5caac2fe 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json index 9170b185..1eee26b9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json index 098c8933..4b882ce4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json index 5e4c6f4e..af8a524c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json index e2252881..f0e465c2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json index efcebe07..47d03c4f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json index 1f125b60..930e32ef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json index a948a091..b55c7569 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json index da97d137..4ff9185f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json index 0b78d9c5..04a7a76a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json index 5b6486ef..1285483c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json index 50d8ac5c..27a6e988 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json index 8b1f7a3b..92149fe4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json index 7c0a785e..04f45e44 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json index d5a2f57e..438aaa3c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json index 4612fa74..aa686834 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json index 88c440ef..8641abdd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json index eb594d4d..8844edec 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json index a324fcdd..584430a8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json index b44c4c88..e309087c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json index 96f2281a..70bbcadf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json index bea31b0e..a5dce38e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json index bea31b0e..a5dce38e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json index 6118b7f7..45c1e649 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json index 4e52f1e8..40285ac4 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json index 72b271b2..2c844be0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json index 765fa07c..7a15d82b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json index ef4ee42e..f0ba7760 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json index c593403e..cf3278b8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json index 99fab42b..a7ec7460 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json index 7f9e0483..19e842f1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json index b24e5b1f..907d5cc0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json index 3fed4aeb..2f397f17 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json index 56146b73..fea43fde 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json index 7bad5ae1..8b795c32 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json index 6b8a9a75..33b47392 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json index 13267585..2c394519 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json index 1f467c7a..2e67a917 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json index f22fdb21..72bbde39 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json index f22fdb21..72bbde39 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json index abff00cc..32af4568 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json index cf4d0821..6dd03101 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json index 2a6b92ee..e29a560a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json index 7f9dd719..d51a8d5a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json index 47c49438..c7d4cb06 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json index 0f591c22..bec1c1cf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json index a1c2fa57..72fddc7c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json index 56a16148..8969f069 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json index 5605059a..66623446 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json index fbbb5e42..45f3de32 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json index 381c2ca8..0f63ed38 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json index 7141aab6..65418939 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json index 699043a7..e2277126 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json index 7a9359d0..4a981aae 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json index be31776c..fc061114 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json index 49859bb0..c75553c7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json index 360c7fdd..bbcdc522 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json index 9845c2d8..378dc4ff 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json index f76e8881..c162c11a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json index 606b932b..211fc75b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json index d6bc558d..fb3fd861 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json index edecea97..66f96972 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json index a23f7593..39523a9c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json index bcd9acb3..dd690bb9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json index e77046d6..ed632d37 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json index 99ef9273..6accfc46 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json index b815e9e5..254773f0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json index edb0ab26..d7355484 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json index 437f8639..39f734a8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json index fc73df75..ae2e9cb0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json index ff79b4f9..46ae567e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json index 833f1994..d57aad1f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json index b7452abe..e4b9ebc5 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json index e20a2ab1..709b59cf 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json index b91f71ce..0939605a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json index 0f0e4448..5d1a05b2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json index 7e51c90e..1a1a1e4f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json index 223b3770..73722a53 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json index e3be4aef..cfb4d937 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json index 0b12bfe2..2b4f70cd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json index 2dbb0d2f..4847b237 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json index 34802cb7..2d99361b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json index e77046d6..ed632d37 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output.json b/tests/fixtures/parser/ast/each-with-comment-scope-output.json index 6cf870a5..13e6a91d 100644 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output.json +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output.json b/tests/fixtures/parser/ast/empty-elements01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output.json +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json index 6947f25c..46e96fe8 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json index 9dceaa1d..f9f3b516 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json index 882f9421..b4d0dab2 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json index 894f218b..67643eaa 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output.json b/tests/fixtures/parser/ast/html-comments01-scope-output.json index dcf6176a..e03a07fa 100644 --- a/tests/fixtures/parser/ast/html-comments01-scope-output.json +++ b/tests/fixtures/parser/ast/html-comments01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output.json b/tests/fixtures/parser/ast/i18n-test-scope-output.json index 084048b0..f05ee87c 100644 --- a/tests/fixtures/parser/ast/i18n-test-scope-output.json +++ b/tests/fixtures/parser/ast/i18n-test-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json index e5f380e1..5fe113cc 100644 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json index 3e9b17eb..7b3b453f 100644 --- a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json +++ b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json index 6d635a13..0dd91cb4 100644 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json index f1b3fe4b..7016569e 100644 --- a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json +++ b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output.json index f418d6b1..8583c557 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output.json +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/label01-scope-output.json b/tests/fixtures/parser/ast/label01-scope-output.json index 1518de1c..b51dc638 100644 --- a/tests/fixtures/parser/ast/label01-scope-output.json +++ b/tests/fixtures/parser/ast/label01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output.json b/tests/fixtures/parser/ast/let-directive01-scope-output.json index d5b190b7..1f238128 100644 --- a/tests/fixtures/parser/ast/let-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output.json b/tests/fixtures/parser/ast/let-directive02-scope-output.json index 98dd33c3..a23f0444 100644 --- a/tests/fixtures/parser/ast/let-directive02-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output.json b/tests/fixtures/parser/ast/let-directive03-scope-output.json index 8715fb62..af682329 100644 --- a/tests/fixtures/parser/ast/let-directive03-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output.json b/tests/fixtures/parser/ast/let-directive04-scope-output.json index c275de6d..f00d5214 100644 --- a/tests/fixtures/parser/ast/let-directive04-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json index cfa04a30..2e095a62 100644 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props01-scope-output.json b/tests/fixtures/parser/ast/props01-scope-output.json index ef580033..a65ca982 100644 --- a/tests/fixtures/parser/ast/props01-scope-output.json +++ b/tests/fixtures/parser/ast/props01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props02-scope-output.json b/tests/fixtures/parser/ast/props02-scope-output.json index 14725437..0f4c42aa 100644 --- a/tests/fixtures/parser/ast/props02-scope-output.json +++ b/tests/fixtures/parser/ast/props02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props03-scope-output.json b/tests/fixtures/parser/ast/props03-scope-output.json index 26001b22..c6c13a11 100644 --- a/tests/fixtures/parser/ast/props03-scope-output.json +++ b/tests/fixtures/parser/ast/props03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props04-scope-output.json b/tests/fixtures/parser/ast/props04-scope-output.json index 26001b22..c6c13a11 100644 --- a/tests/fixtures/parser/ast/props04-scope-output.json +++ b/tests/fixtures/parser/ast/props04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output.json index d60909e3..df1d684e 100644 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output.json +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json index b6c16cf5..2da89d4d 100644 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json index 41a08566..3e973d09 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json index 61297f5f..545f3c68 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json index 2ba87d16..67fc4df6 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json index 7d5e035f..0b51f1a1 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json index ccd58aa2..b00da738 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json index 7b0e08a4..e3ea65b7 100644 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json index a6953e56..491dcfd0 100644 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json index a1187832..70b27a67 100644 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json index 0ce45b7b..f1c8d085 100644 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json index 416b0c2e..dd3a4ea2 100644 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json index e856ab20..79d70897 100644 --- a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/sass-scope-output.json b/tests/fixtures/parser/ast/sass-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/sass-scope-output.json +++ b/tests/fixtures/parser/ast/sass-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output.json b/tests/fixtures/parser/ast/script-in-style-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/script-in-style-scope-output.json +++ b/tests/fixtures/parser/ast/script-in-style-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/script-tag-scope-output.json b/tests/fixtures/parser/ast/script-tag-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/script-tag-scope-output.json +++ b/tests/fixtures/parser/ast/script-tag-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output.json +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output.json b/tests/fixtures/parser/ast/store-bindings-scope-output.json index f687cfa0..9a318f3b 100644 --- a/tests/fixtures/parser/ast/store-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/store-bindings-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output.json b/tests/fixtures/parser/ast/style-directive01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/style-directive01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output.json b/tests/fixtures/parser/ast/style-directive02-scope-output.json index e4c88be2..b2cadb59 100644 --- a/tests/fixtures/parser/ast/style-directive02-scope-output.json +++ b/tests/fixtures/parser/ast/style-directive02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output.json b/tests/fixtures/parser/ast/style-directive03-scope-output.json index c6111112..4e5ca43c 100644 --- a/tests/fixtures/parser/ast/style-directive03-scope-output.json +++ b/tests/fixtures/parser/ast/style-directive03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-global01-scope-output.json b/tests/fixtures/parser/ast/style-global01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style-global01-scope-output.json +++ b/tests/fixtures/parser/ast/style-global01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-global02-scope-output.json b/tests/fixtures/parser/ast/style-global02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style-global02-scope-output.json +++ b/tests/fixtures/parser/ast/style-global02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output.json b/tests/fixtures/parser/ast/style-in-script-scope-output.json index df77d617..8be3c32c 100644 --- a/tests/fixtures/parser/ast/style-in-script-scope-output.json +++ b/tests/fixtures/parser/ast/style-in-script-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style01-scope-output.json b/tests/fixtures/parser/ast/style01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style01-scope-output.json +++ b/tests/fixtures/parser/ast/style01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style02-scope-output.json b/tests/fixtures/parser/ast/style02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/style02-scope-output.json +++ b/tests/fixtures/parser/ast/style02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json index dde610ce..3cbffdf5 100644 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json index d6cb8fd8..ad84f430 100644 --- a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json @@ -1,6 +1,5 @@ { "type": "global", - "references": [], "variables": [ { "name": "$$slots", @@ -28,20 +27,48 @@ { "identifier": { "type": "Identifier", - "name": "$state" + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } }, "from": "module", - "resolved": null, - "init": null + "init": null, + "resolved": null }, { "identifier": { "type": "Identifier", - "name": "$state" + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } }, "from": "module", - "resolved": null, - "init": null + "init": null, + "resolved": null } ] }, @@ -70,6 +97,7 @@ "references": [] } ], + "references": [], "childScopes": [ { "type": "module", @@ -80,7 +108,10 @@ { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -99,7 +130,10 @@ "name": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -116,7 +150,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -135,7 +172,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [40, 41], + "range": [ + 40, + 41 + ], "loc": { "start": { "line": 2, @@ -151,7 +191,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -164,7 +207,10 @@ } }, "optional": false, - "range": [33, 42], + "range": [ + 33, + 42 + ], "loc": { "start": { "line": 2, @@ -176,7 +222,10 @@ } } }, - "range": [25, 42], + "range": [ + 25, + 42 + ], "loc": { "start": { "line": 2, @@ -195,7 +244,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -212,7 +264,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -229,7 +284,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -246,7 +304,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -263,7 +324,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [125, 130], + "range": [ + 125, + 130 + ], "loc": { "start": { "line": 7, @@ -280,7 +344,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -301,7 +368,10 @@ { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -320,7 +390,10 @@ "name": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -337,7 +410,10 @@ "id": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -355,7 +431,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -368,7 +447,10 @@ } }, "optional": false, - "range": [57, 65], + "range": [ + 57, + 65 + ], "loc": { "start": { "line": 3, @@ -380,7 +462,10 @@ } } }, - "range": [50, 65], + "range": [ + 50, + 65 + ], "loc": { "start": { "line": 3, @@ -399,7 +484,10 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -416,7 +504,10 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -437,7 +528,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -454,7 +548,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -471,7 +568,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -491,7 +591,10 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -508,7 +611,10 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -525,7 +631,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -545,7 +654,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [125, 130], + "range": [ + 125, + 130 + ], "loc": { "start": { "line": 7, @@ -562,7 +674,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -585,7 +700,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -602,7 +720,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -622,7 +743,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -639,7 +763,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -660,7 +787,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -680,7 +810,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -700,4 +833,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json index d7a9f934..58e9ef88 100644 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output.json b/tests/fixtures/parser/ast/this-attr01-scope-output.json index b728cf65..74955551 100644 --- a/tests/fixtures/parser/ast/this-attr01-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output.json b/tests/fixtures/parser/ast/this-attr02-scope-output.json index d6e06927..8c61b3c3 100644 --- a/tests/fixtures/parser/ast/this-attr02-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output.json b/tests/fixtures/parser/ast/this-attr03-scope-output.json index 6507504a..1a36ee04 100644 --- a/tests/fixtures/parser/ast/this-attr03-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output.json b/tests/fixtures/parser/ast/this-attr04-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/this-attr04-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output.json b/tests/fixtures/parser/ast/this-attr05-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/this-attr05-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output.json index a7744f2c..9f943f84 100644 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output.json +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$props01-scope-output.json b/tests/fixtures/parser/ast/ts-$$props01-scope-output.json index 88771ee2..0aa036ec 100644 --- a/tests/fixtures/parser/ast/ts-$$props01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$props01-scope-output.json @@ -66,6 +66,36 @@ "resolved": null } ] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json index b6c5c412..f249603c 100644 --- a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json @@ -42,6 +42,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json index 4b25ba9f..cd38315b 100644 --- a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output.json b/tests/fixtures/parser/ast/ts-each01-scope-output.json index 648672e7..ffdd10d8 100644 --- a/tests/fixtures/parser/ast/ts-each01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-each01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output.json b/tests/fixtures/parser/ast/ts-event01-scope-output.json index 3f372d59..fc8478f2 100644 --- a/tests/fixtures/parser/ast/ts-event01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output.json b/tests/fixtures/parser/ast/ts-event02-scope-output.json index 6b6626a5..0cf44528 100644 --- a/tests/fixtures/parser/ast/ts-event02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output.json b/tests/fixtures/parser/ast/ts-event03-scope-output.json index 81e1dedf..656a23db 100644 --- a/tests/fixtures/parser/ast/ts-event03-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output.json b/tests/fixtures/parser/ast/ts-event04-scope-output.json index aeef6d56..19c26dc8 100644 --- a/tests/fixtures/parser/ast/ts-event04-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output.json b/tests/fixtures/parser/ast/ts-event05-scope-output.json index 260ec34f..4e4255e2 100644 --- a/tests/fixtures/parser/ast/ts-event05-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output.json b/tests/fixtures/parser/ast/ts-event06-scope-output.json index 6bf44ff7..466cfcc8 100644 --- a/tests/fixtures/parser/ast/ts-event06-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output.json b/tests/fixtures/parser/ast/ts-issue226-scope-output.json index 26998ce8..f686e158 100644 --- a/tests/fixtures/parser/ast/ts-issue226-scope-output.json +++ b/tests/fixtures/parser/ast/ts-issue226-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json index 85cf239b..68db634a 100644 --- a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output.json b/tests/fixtures/parser/ast/ts-newline-scope-output.json index f76efcb8..a09008a9 100644 --- a/tests/fixtures/parser/ast/ts-newline-scope-output.json +++ b/tests/fixtures/parser/ast/ts-newline-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json index 133d412f..ca2b2075 100644 --- a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output.json b/tests/fixtures/parser/ast/ts-promise01-scope-output.json index 5c2dda73..7ddf379e 100644 --- a/tests/fixtures/parser/ast/ts-promise01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-promise01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output.json b/tests/fixtures/parser/ast/ts-promise02-scope-output.json index 5c38953b..0417e4a8 100644 --- a/tests/fixtures/parser/ast/ts-promise02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-promise02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output.json index 6c8b5589..fe02aad0 100644 --- a/tests/fixtures/parser/ast/ts-reactive01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output.json index 2c0d503f..abc349b2 100644 --- a/tests/fixtures/parser/ast/ts-reactive02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output.json index d0233285..9ce5e535 100644 --- a/tests/fixtures/parser/ast/ts-reactive03-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output.json index 08efafb6..c72a2998 100644 --- a/tests/fixtures/parser/ast/ts-reactive04-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output.json index 5868c3d3..5b089e63 100644 --- a/tests/fixtures/parser/ast/ts-reactive05-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive05-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output.json index 10e688c5..95fcbb9e 100644 --- a/tests/fixtures/parser/ast/ts-reactive06-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive06-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json index 82916d7b..c3e4d86b 100644 --- a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json index cf076acd..ab4d224b 100644 --- a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output.json b/tests/fixtures/parser/ast/ts-store01-scope-output.json index e3e48d32..56751e55 100644 --- a/tests/fixtures/parser/ast/ts-store01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-store01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output.json b/tests/fixtures/parser/ast/ts-store02-scope-output.json index 59d4ba2a..1bfc506f 100644 --- a/tests/fixtures/parser/ast/ts-store02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-store02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output.json b/tests/fixtures/parser/ast/ts-store03-scope-output.json index db945206..8fd524b0 100644 --- a/tests/fixtures/parser/ast/ts-store03-scope-output.json +++ b/tests/fixtures/parser/ast/ts-store03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output.json b/tests/fixtures/parser/ast/ts-use01-scope-output.json index 91a012c6..5dc49a79 100644 --- a/tests/fixtures/parser/ast/ts-use01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-use01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output.json index 8e268574..4ab995a6 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json index 6947f25c..46e96fe8 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json index 478f1ddf..b97f9daf 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json index b8fd24ef..ea6aae9f 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output.json index 4c6db18a..72f4b5e7 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json index 22c39e5a..b50b49b9 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json index f49f0151..3b06752b 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json index 7034920d..aa286c67 100644 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json index 3f484d38..c4bfa0d1 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json index 80dd0940..5779f6ed 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output.json index 4cbabbe0..93f027b8 100644 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json index 4d4d4df8..a8d313ab 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json index 3949b715..26140a9f 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json index 2f6834ad..096352ed 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json index 802d02d1..520e306f 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json index ecba3001..08a2ec32 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json index 7d818404..8a66d688 100644 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json index fa150e89..dc8fee14 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json index 7f4ea7b5..9b752a12 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json index 94abca35..5ce8b58e 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json index d9dfaad7..c67b0d06 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json index 22ba8855..a6ad99c6 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json index f8f2fd1c..4ad1f6b6 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json index b4383e8b..32229d1a 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json index 49ccd447..4e878fb9 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json index abf9aefd..3ec8116f 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json index 045eb8b9..c31a8d5d 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json index c2e1562f..07c48bbc 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json index 045eb8b9..c31a8d5d 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json index 3ff37e2b..0487c083 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json index de8ad023..f2f8b624 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json index 95cc1601..e3a07296 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json index 9694da1d..e54bcc78 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json index 9b6180d3..6fd75e21 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json index d444e2c1..b9a04aeb 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json index 826fddf0..69aaebdd 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json index b68a286f..cb96922e 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json index 2ff11068..c9c643a2 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json index 31e48a68..39bc0800 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json index 103d301c..0282a0c4 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json index 0750fe26..5ab91c95 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json index b6d37d55..228ddae8 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json index 3148c422..8a89f21f 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json index 802d02d1..520e306f 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json index d2b520ce..826f25a6 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json index 247f30d0..ddb7bae8 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json index 0c32ef75..512ec7e3 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json index 7e087144..0015eaf6 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json index 50465ea7..3a667796 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json index 9352f3d3..a4d7b8f6 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json index 60ed4d1c..5511b08b 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json index 36b838c1..1c40e5a2 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json index 7b083aec..d14c7bc2 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json index 29606a3d..e790a128 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json index af378fb0..e1c7a138 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json index 90b0c54a..231d7bf1 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json index d481bb78..5a27f922 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json index e277ad25..3a433098 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json index 02e1e272..1ab1442e 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json index fd1807df..abb34b09 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json index fbd69ca8..dbe14f8d 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json index 6d748fad..5d8660e6 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json index 1341eafc..0dcb13a6 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json index d03483ce..25331dd1 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json index f5fc6fca..72b0d3e8 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json index 5495b9f4..c5cf427c 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json index 9fa49c89..409d9361 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json index 0ad83ba1..aa683a62 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json @@ -65,6 +65,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json index 1975ce7d..61f318c4 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json index 314a82cd..1bdd20c0 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json index 73bf0370..8193ed1e 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json index a153a661..47db0d03 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json index 7df7d267..af03e5cf 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json index 8aea8a11..2a533e00 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json index c730ce47..8c8e2c3c 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json index d42ad87c..10df24eb 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json index a1c47e26..6b62e0b3 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json index dbcfec92..ff33861e 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json index 569c1948..9c3ac71e 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json index 0f871208..2bcbc4fe 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json index deed7fcd..ccaaf775 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json index 618f808d..faa49206 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json index 21f1f680..12b40a8b 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output.json index c39f7097..8cc22f29 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json index 9bb07114..eb9608a8 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json index a3748aef..5de76ff9 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json index 8e6c9ce7..f7fd8ea8 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json index 1ffb9b82..3e1b929d 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json index 07f410db..192a2d80 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json index d392ca4b..4c868271 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json index aa5d1b86..214fd6c1 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json index c3e51915..4a1358cd 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json index b73251da..74b4083e 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json index 66141254..09e7dd38 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json index 4c39c697..c05d8eca 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json index b9abbfc6..3f9cee0a 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json index 9f544b73..f152a4e2 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json index 0bd63273..ee2640d0 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json index 19ee68bb..c3606b93 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json index 4a5b1da7..b5e413cd 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json index 814aebfa..9d188d72 100644 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output.json index cd8da317..ac4bbc96 100644 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json index 91b57371..a79784f4 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output.json index 65393d1c..c20e0036 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json index ed9f8f1d..57e1d786 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output.json b/tests/fixtures/parser/ast/tutorial/update-scope-output.json index 279f54e3..fb693c1a 100644 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json index 95c9626b..f708a62c 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json index 5e2a8352..23a92ab1 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json index 7c0d6b94..4fe41975 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json index 584f544c..eef95c8d 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json index 82bf78d5..fe3cfe5c 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output.json index 796fe41b..e469cab1 100644 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json index 239c877d..af2faece 100644 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json @@ -18,6 +18,36 @@ "identifiers": [], "defs": [], "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect.pre", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] } ], "references": [], diff --git a/tests/src/parser/parser.ts b/tests/src/parser/parser.ts index 8e1057cc..ca6d72b1 100644 --- a/tests/src/parser/parser.ts +++ b/tests/src/parser/parser.ts @@ -2,7 +2,6 @@ import assert from "assert"; import fs from "fs"; import semver from "semver"; -import { VERSION as SVELTE_VERSION } from "svelte/compiler"; import { traverseNodes } from "../../../src/traverse"; import { parseForESLint } from "../../../src"; @@ -24,17 +23,13 @@ describe("Check for AST.", () => { input, inputFileName, outputFileName, - scopeFile, config, + getScopeFile, meetRequirements, } of listupFixtures()) { if (!meetRequirements("parse")) { continue; } - const isSvelte5Only = inputFileName.includes("/svelte5/"); - if (isSvelte5Only && !SVELTE_VERSION.startsWith("5")) { - continue; - } describe(inputFileName, () => { let result: any; @@ -51,7 +46,7 @@ describe("Check for AST.", () => { if (meetRequirements("scope")) it("most to generate the expected scope.", () => { let json: any = scopeToJSON(result.scopeManager); - let output: any = scopeFile; + let output: any = getScopeFile(); if ( result.services?.program // use ts parser diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 3b0f8481..b9232b93 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -34,12 +34,13 @@ export function* listupFixtures(dir?: string): Iterable<{ input: string; inputFileName: string; outputFileName: string; - scopeFile: string | null; + scopeFileName: string; typeFileName: string | null; config: Linter.ParserOptions; requirements: { scope?: Record; }; + getScopeFile: () => string | null; getRuleOutputFileName: (ruleName: string) => string; meetRequirements: (key: "test" | "scope" | "parse") => boolean; }> { @@ -85,22 +86,33 @@ function* listupFixturesImpl(dir: string): Iterable<{ input: string; inputFileName: string; outputFileName: string; - scopeFile: string | null; + scopeFileName: string; typeFileName: string | null; config: Linter.ParserOptions; requirements: { scope?: Record; }; + getScopeFile: () => string | null; getRuleOutputFileName: (ruleName: string) => string; meetRequirements: (key: "test" | "scope" | "parse") => boolean; }> { for (const filename of fs.readdirSync(dir)) { const inputFileName = path.join(dir, filename); + + const isSvelte5Only = inputFileName.includes("/svelte5/"); + if (isSvelte5Only && !SVELTE_VERSION.startsWith("5")) { + continue; + } + if (filename.endsWith("input.svelte")) { const outputFileName = inputFileName.replace( /input\.svelte$/u, "output.json", ); + const scopeFileName = inputFileName.replace( + /input\.svelte$/u, + "scope-output.json", + ); const typeFileName = inputFileName.replace( /input\.svelte$/u, "type-output.svelte", @@ -125,10 +137,11 @@ function* listupFixturesImpl(dir: string): Iterable<{ input, inputFileName, outputFileName, - scopeFile: getScopeFile(inputFileName), + scopeFileName, typeFileName: fs.existsSync(typeFileName) ? typeFileName : null, config, requirements, + getScopeFile: () => getScopeFile(inputFileName), getRuleOutputFileName: (ruleName) => { return inputFileName.replace( /input\.svelte$/u, From 2bf76a912342714c1591907106ae8e535717e78e Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:16:51 +0900 Subject: [PATCH 11/27] revert --- .../parser/ast/$$slots-scope-output.json | 30 ------------------- .../parser/ast/$var-scope-output.json | 30 ------------------- ...const01-within-component-scope-output.json | 30 ------------------- .../parser/ast/attr01-scope-output.json | 30 ------------------- .../parser/ast/await01-scope-output.json | 30 ------------------- .../parser/ast/await02-scope-output.json | 30 ------------------- .../parser/ast/await04-scope-output.json | 30 ------------------- .../blog/write-less-code01-scope-output.json | 30 ------------------- .../ast/class-directive01-scope-output.json | 30 ------------------- .../parser/ast/comments01-scope-output.json | 30 ------------------- .../parser/ast/components01-scope-output.json | 30 ------------------- .../parser/ast/components02-scope-output.json | 30 ------------------- .../parser/ast/components03-scope-output.json | 30 ------------------- .../parser/ast/components04-scope-output.json | 30 ------------------- ...ective-on-with-expr-like-scope-output.json | 30 ------------------- .../directive-use-with-expr-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../02-scope-output.json | 30 ------------------- .../03-scope-output.json | 30 ------------------- .../04-scope-output.json | 30 ------------------- .../05-scope-output.json | 30 ------------------- .../06-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../02-scope-output.json | 30 ------------------- .../03-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../03-style/01-scope-output.json | 30 ------------------- .../03-style/02-scope-output.json | 30 ------------------- .../03-style/03-scope-output.json | 30 ------------------- .../03-style/04-scope-output.json | 30 ------------------- .../01-tags/01-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../02-scope-output.json | 30 ------------------- .../03-scope-output.json | 30 ------------------- .../04-scope-output.json | 30 ------------------- .../05-scope-output.json | 30 ------------------- .../06-scope-output.json | 30 ------------------- .../07-scope-output.json | 30 ------------------- .../08-scope-output.json | 30 ------------------- .../09-scope-output.json | 30 ------------------- .../10-scope-output.json | 30 ------------------- .../11-scope-output.json | 30 ------------------- .../03-text-expressions/01-scope-output.json | 30 ------------------- .../03-text-expressions/02-scope-output.json | 30 ------------------- .../04-comments/01-scope-output.json | 30 ------------------- .../04-comments/02-scope-output.json | 30 ------------------- .../05-hash-if/01-scope-output.json | 30 ------------------- .../05-hash-if/02-scope-output.json | 30 ------------------- .../05-hash-if/03-scope-output.json | 30 ------------------- .../06-hash-each/01-scope-output.json | 30 ------------------- .../06-hash-each/02-scope-output.json | 30 ------------------- .../06-hash-each/03-scope-output.json | 30 ------------------- .../06-hash-each/04-scope-output.json | 30 ------------------- .../06-hash-each/05-scope-output.json | 30 ------------------- .../06-hash-each/06-scope-output.json | 30 ------------------- .../07-hash-await/01-scope-output.json | 30 ------------------- .../07-hash-await/02-scope-output.json | 30 ------------------- .../07-hash-await/03-scope-output.json | 30 ------------------- .../07-hash-await/04-scope-output.json | 30 ------------------- .../07-hash-await/05-scope-output.json | 30 ------------------- .../08-hash-key/01-scope-output.json | 30 ------------------- .../08-hash-key/02-scope-output.json | 30 ------------------- .../08-hash-key/03-scope-output.json | 30 ------------------- .../09-at-html/01-scope-output.json | 30 ------------------- .../09-at-html/02-scope-output.json | 30 ------------------- .../10-at-debug/01-scope-output.json | 30 ------------------- .../10-at-debug/02-scope-output.json | 30 ------------------- .../10-at-debug/03-scope-output.json | 30 ------------------- .../10.1-at-const/01-scope-output.json | 30 ------------------- .../10.1-at-const/02-scope-output.json | 30 ------------------- .../01-on-eventname/01-scope-output.json | 30 ------------------- .../01-on-eventname/02-scope-output.json | 30 ------------------- .../01-on-eventname/03-scope-output.json | 30 ------------------- .../01-on-eventname/04-scope-output.json | 30 ------------------- .../01-on-eventname/05-scope-output.json | 30 ------------------- .../01-on-eventname/06-scope-output.json | 30 ------------------- .../02-bind-property/01-scope-output.json | 30 ------------------- .../02-bind-property/02-scope-output.json | 30 ------------------- .../02-bind-property/03-scope-output.json | 30 ------------------- .../02-bind-property/04-scope-output.json | 30 ------------------- .../02-bind-property/05-scope-output.json | 30 ------------------- .../02-bind-property/06-scope-output.json | 30 ------------------- .../02-bind-property/07-scope-output.json | 30 ------------------- .../02-bind-property/08-scope-output.json | 30 ------------------- .../02-bind-property/09-scope-output.json | 30 ------------------- .../02-bind-property/10-scope-output.json | 30 ------------------- .../02-bind-property/11-scope-output.json | 30 ------------------- .../03-bind-group/01-scope-output.json | 30 ------------------- .../03-bind-group/02-scope-output.json | 30 ------------------- .../04-bind-this/01-scope-output.json | 30 ------------------- .../04-bind-this/02-scope-output.json | 30 ------------------- .../05-class-name/01-scope-output.json | 30 ------------------- .../05-class-name/02-scope-output.json | 30 ------------------- .../05.1-style-property/01-scope-output.json | 30 ------------------- .../05.1-style-property/02-scope-output.json | 30 ------------------- .../02.1-scope-output.json | 30 ------------------- .../05.1-style-property/03-scope-output.json | 30 ------------------- .../06-use-action/01-scope-output.json | 30 ------------------- .../06-use-action/02-scope-output.json | 30 ------------------- .../06-use-action/03-scope-output.json | 30 ------------------- .../07-transition-fn/01-scope-output.json | 30 ------------------- .../07-transition-fn/02-scope-output.json | 30 ------------------- .../07-transition-fn/03-scope-output.json | 30 ------------------- .../07-transition-fn/04-scope-output.json | 30 ------------------- .../07-transition-fn/05-scope-output.json | 30 ------------------- .../07-transition-fn/05-ts-scope-output.json | 30 ------------------- .../07-transition-fn/06-scope-output.json | 30 ------------------- .../07-transition-fn/07-scope-output.json | 30 ------------------- .../08-in-fn-out-fn/01-scope-output.json | 30 ------------------- .../08-in-fn-out-fn/02-scope-output.json | 30 ------------------- .../09-animate-fn/01-scope-output.json | 30 ------------------- .../09-animate-fn/02-scope-output.json | 30 ------------------- .../09-animate-fn/03-scope-output.json | 30 ------------------- .../09-animate-fn/04-scope-output.json | 30 ------------------- .../09-animate-fn/05-scope-output.json | 30 ------------------- .../01-on-eventname/01-scope-output.json | 30 ------------------- .../01-on-eventname/02-scope-output.json | 30 ------------------- .../01-on-eventname/03-scope-output.json | 30 ------------------- .../02-style-props/01-scope-output.json | 30 ------------------- .../02-style-props/02-scope-output.json | 30 ------------------- .../02-style-props/03-scope-output.json | 30 ------------------- .../03-bind-property/01-scope-output.json | 30 ------------------- .../03-bind-property/02-scope-output.json | 30 ------------------- .../04-bind-this/01-scope-output.json | 30 ------------------- .../04-bind-this/02-scope-output.json | 30 ------------------- .../13-slot/00/01-scope-output.json | 30 ------------------- .../13-slot/00/02-scope-output.json | 30 ------------------- .../01-slot-name-name/01-scope-output.json | 30 ------------------- .../01-slot-name-name/02-scope-output.json | 30 ------------------- .../13-slot/02-$$slots/01-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../02-scope-output.json | 30 ------------------- .../14-svelte-self/01-scope-output.json | 30 ------------------- .../01-scope-output.json | 30 ------------------- .../02-scope-output.json | 30 ------------------- .../15_2-svelte-element/01-scope-output.json | 30 ------------------- .../15_2-svelte-element/02-scope-output.json | 30 ------------------- .../16_1-svelte-window/01-scope-output.json | 30 ------------------- .../16_1-svelte-window/02-scope-output.json | 30 ------------------- .../16_1-svelte-window/03-scope-output.json | 30 ------------------- .../16_1-svelte-window/04-scope-output.json | 30 ------------------- .../16_2-svelte-document/01-scope-output.json | 30 ------------------- .../16_2-svelte-document/02-scope-output.json | 30 ------------------- .../17-svelte-body/01-scope-output.json | 30 ------------------- .../17-svelte-body/02-scope-output.json | 30 ------------------- .../18-svelte-head/01-scope-output.json | 30 ------------------- .../18-svelte-head/02-scope-output.json | 30 ------------------- .../19-svelte-options/02-scope-output.json | 30 ------------------- .../20-svelte-fragment/01-scope-output.json | 30 ------------------- .../ast/each-with-comment-scope-output.json | 30 ------------------- .../ast/empty-elements01-scope-output.json | 30 ------------------- .../ast/hello/hello-world01-scope-output.json | 30 ------------------- .../ast/hello/hello-world02-scope-output.json | 30 ------------------- .../ast/hello/hello-world03-scope-output.json | 30 ------------------- .../ast/hello/hello-world04-scope-output.json | 30 ------------------- .../ast/hello/hello-world05-scope-output.json | 30 ------------------- .../ast/html-comments01-scope-output.json | 30 ------------------- .../parser/ast/i18n-test-scope-output.json | 30 ------------------- .../illegal/dot-in-bind01-scope-output.json | 30 ------------------- ...325-eslint-plugin-svelte-scope-output.json | 30 ------------------- ...327-eslint-plugin-svelte-scope-output.json | 30 ------------------- ...338-eslint-plugin-svelte-scope-output.json | 30 ------------------- .../ast/kit-demo-home-scope-output.json | 30 ------------------- .../parser/ast/label01-scope-output.json | 30 ------------------- .../ast/let-directive01-scope-output.json | 30 ------------------- .../ast/let-directive02-scope-output.json | 30 ------------------- .../ast/let-directive03-scope-output.json | 30 ------------------- .../ast/let-directive04-scope-output.json | 30 ------------------- .../mustache-with-comment-scope-output.json | 30 ------------------- .../nesting-script-tag01-scope-output.json | 30 ------------------- .../parser/ast/props01-scope-output.json | 30 ------------------- .../parser/ast/props02-scope-output.json | 30 ------------------- .../parser/ast/props03-scope-output.json | 30 ------------------- .../parser/ast/props04-scope-output.json | 30 ------------------- .../ast/pug/each/each01-scope-output.json | 30 ------------------- .../self-closing-template-scope-output.json | 30 ------------------- ...tions-with-destructure01-scope-output.json | 30 ------------------- ...tions-with-destructure02-scope-output.json | 30 ------------------- ...tions-with-destructure03-scope-output.json | 30 ------------------- ...tions-with-destructure04-scope-output.json | 30 ------------------- ...tions-with-destructure05-scope-output.json | 30 ------------------- .../reactive-with-store01-scope-output.json | 30 ------------------- .../reactive-with-store02-scope-output.json | 30 ------------------- .../ast/reactive-with-var01-scope-output.json | 30 ------------------- .../ast/reactive-with-var02-scope-output.json | 30 ------------------- .../ast/reactive-with-var03-scope-output.json | 30 ------------------- .../reactive-with-var04-ts-scope-output.json | 30 ------------------- .../parser/ast/sass-scope-output.json | 30 ------------------- .../ast/script-in-style-scope-output.json | 30 ------------------- .../parser/ast/script-tag-scope-output.json | 30 ------------------- .../self-closing-style01-scope-output.json | 30 ------------------- .../ast/store-bindings-scope-output.json | 30 ------------------- .../ast/style-directive01-scope-output.json | 30 ------------------- .../ast/style-directive02-scope-output.json | 30 ------------------- .../ast/style-directive03-scope-output.json | 30 ------------------- .../ast/style-global01-scope-output.json | 30 ------------------- .../ast/style-global02-scope-output.json | 30 ------------------- .../ast/style-in-script-scope-output.json | 30 ------------------- .../parser/ast/style01-scope-output.json | 30 ------------------- .../parser/ast/style02-scope-output.json | 30 ------------------- ...e-element-with-bind-this-scope-output.json | 30 ------------------- ...plate-curly-spacing-test-scope-output.json | 30 ------------------- .../parser/ast/this-attr01-scope-output.json | 30 ------------------- .../parser/ast/this-attr02-scope-output.json | 30 ------------------- .../parser/ast/this-attr03-scope-output.json | 30 ------------------- .../parser/ast/this-attr04-scope-output.json | 30 ------------------- .../parser/ast/this-attr05-scope-output.json | 30 ------------------- .../ast/trailing-comment01-scope-output.json | 30 ------------------- .../parser/ast/ts-$$props01-scope-output.json | 30 ------------------- .../parser/ast/ts-$$slots01-scope-output.json | 30 ------------------- .../ts-$$slots02-no-slot-scope-output.json | 30 ------------------- .../ast/ts-$$slots03-named-scope-output.json | 30 ------------------- .../ast/ts-$$slots04-named-scope-output.json | 30 ------------------- .../ts-await-non-promise01-scope-output.json | 30 ------------------- .../parser/ast/ts-each01-scope-output.json | 30 ------------------- .../parser/ast/ts-event01-scope-output.json | 30 ------------------- .../parser/ast/ts-event02-scope-output.json | 30 ------------------- .../parser/ast/ts-event03-scope-output.json | 30 ------------------- .../parser/ast/ts-event04-scope-output.json | 30 ------------------- .../parser/ast/ts-event05-scope-output.json | 30 ------------------- .../parser/ast/ts-event06-scope-output.json | 30 ------------------- .../parser/ast/ts-issue226-scope-output.json | 30 ------------------- .../ast/ts-let/ts-let01-scope-output.json | 30 ------------------- .../parser/ast/ts-newline-scope-output.json | 30 ------------------- .../ast/ts-not-reactive01-scope-output.json | 30 ------------------- .../parser/ast/ts-promise01-scope-output.json | 30 ------------------- .../parser/ast/ts-promise02-scope-output.json | 30 ------------------- .../ast/ts-reactive01-scope-output.json | 30 ------------------- .../ast/ts-reactive02-scope-output.json | 30 ------------------- .../ast/ts-reactive03-scope-output.json | 30 ------------------- .../ast/ts-reactive04-scope-output.json | 30 ------------------- .../ast/ts-reactive05-scope-output.json | 30 ------------------- .../ast/ts-reactive06-scope-output.json | 30 ------------------- .../ast/ts-scope-issue01-scope-output.json | 30 ------------------- .../ast/ts-shorthand-attr01-scope-output.json | 30 ------------------- .../parser/ast/ts-store01-scope-output.json | 30 ------------------- .../parser/ast/ts-store02-scope-output.json | 30 ------------------- .../parser/ast/ts-store03-scope-output.json | 30 ------------------- .../parser/ast/ts-use01-scope-output.json | 30 ------------------- .../ast/tutorial/actions-scope-output.json | 30 ------------------- .../tutorial/adding-data-scope-output.json | 30 ------------------- ...ng-parameters-to-actions-scope-output.json | 30 ------------------- ...arameters-to-transitions-scope-output.json | 30 ------------------- .../ast/tutorial/animate-scope-output.json | 30 ------------------- .../auto-subscriptions01-scope-output.json | 30 ------------------- .../tutorial/await-blocks-scope-output.json | 30 ------------------- .../ast/tutorial/basics-scope-output.json | 30 ------------------- .../ast/tutorial/bind-this-scope-output.json | 30 ------------------- .../checkbox-inputs-scope-output.json | 30 ------------------- .../class-shorthand-scope-output.json | 30 ------------------- .../ast/tutorial/classes-scope-output.json | 30 ------------------- .../component-bindings01-scope-output.json | 30 ------------------- .../component-bindings02-scope-output.json | 30 ------------------- .../component-events01-scope-output.json | 30 ------------------- .../component-events02-scope-output.json | 30 ------------------- .../congratulations-scope-output.json | 30 ------------------- ...contenteditable-bindings-scope-output.json | 30 ------------------- .../tutorial/context-api01-scope-output.json | 30 ------------------- .../tutorial/context-api02-scope-output.json | 30 ------------------- .../tutorial/context-api03-scope-output.json | 30 ------------------- ...custom-css-transitions01-scope-output.json | 30 ------------------- ...custom-css-transitions02-scope-output.json | 30 ------------------- .../custom-js-transitions-scope-output.json | 30 ------------------- .../tutorial/custom-stores-scope-output.json | 30 ------------------- .../ast/tutorial/debug01-scope-output.json | 30 ------------------- .../ast/tutorial/debug02-scope-output.json | 30 ------------------- .../declaring-props01-scope-output.json | 30 ------------------- .../declaring-props02-scope-output.json | 30 ------------------- .../default-values01-scope-output.json | 30 ------------------- .../default-values02-scope-output.json | 30 ------------------- .../deferred-transitions-scope-output.json | 30 ------------------- .../tutorial/derived-stores-scope-output.json | 30 ------------------- .../ast/tutorial/dimensions-scope-output.json | 30 ------------------- .../dom-event-forwarding01-scope-output.json | 30 ------------------- .../dom-event-forwarding02-scope-output.json | 30 ------------------- .../ast/tutorial/dom-events-scope-output.json | 30 ------------------- .../dynamic-attributes-scope-output.json | 30 ------------------- .../each-block-bindings-scope-output.json | 30 ------------------- .../tutorial/each-blocks01-scope-output.json | 30 ------------------- .../tutorial/each-blocks02-scope-output.json | 30 ------------------- .../tutorial/else-blocks-scope-output.json | 30 ------------------- .../else-if-blocks01-scope-output.json | 30 ------------------- .../else-if-blocks02-scope-output.json | 30 ------------------- .../event-forwarding01-scope-output.json | 30 ------------------- .../event-forwarding02-scope-output.json | 30 ------------------- .../event-forwarding03-scope-output.json | 30 ------------------- .../event-forwarding04-scope-output.json | 30 ------------------- .../event-modifiers-scope-output.json | 30 ------------------- .../tutorial/group-inputs-scope-output.json | 30 ------------------- .../tutorial/html-tags01-scope-output.json | 30 ------------------- .../tutorial/html-tags02-scope-output.json | 30 ------------------- .../ast/tutorial/if-blocks-scope-output.json | 30 ------------------- .../ast/tutorial/in-and-out-scope-output.json | 30 ------------------- .../inline-handlers-scope-output.json | 30 ------------------- .../keyed-each-blocks-scope-output.json | 30 ------------------- .../local-transitions-scope-output.json | 30 ------------------- .../tutorial/media-elements-scope-output.json | 30 ------------------- .../module-exports01-scope-output.json | 30 ------------------- .../module-exports02-scope-output.json | 30 ------------------- ...multiple-select-bindings-scope-output.json | 30 ------------------- .../tutorial/named-slots01-scope-output.json | 30 ------------------- .../tutorial/named-slots02-scope-output.json | 30 ------------------- .../nested-components01-scope-output.json | 30 ------------------- .../nested-components02-scope-output.json | 30 ------------------- .../numeric-inputs01-scope-output.json | 30 ------------------- .../numeric-inputs02-scope-output.json | 30 ------------------- .../ast/tutorial/ondestroy-scope-output.json | 30 ------------------- .../ast/tutorial/onmount-scope-output.json | 30 ------------------- .../optional-slots01-scope-output.json | 30 ------------------- .../optional-slots02-scope-output.json | 30 ------------------- .../optional-slots03-scope-output.json | 30 ------------------- .../reactive-assignments-scope-output.json | 30 ------------------- .../reactive-declarations-scope-output.json | 30 ------------------- .../reactive-statements-scope-output.json | 30 ------------------- .../readable-stores-scope-output.json | 30 ------------------- .../select-bindings-scope-output.json | 30 ------------------- .../tutorial/sharing-code01-scope-output.json | 30 ------------------- .../tutorial/sharing-code02-scope-output.json | 30 ------------------- .../slot-fallbacks01-scope-output.json | 30 ------------------- .../slot-fallbacks02-scope-output.json | 30 ------------------- .../tutorial/slot-props01-scope-output.json | 30 ------------------- .../tutorial/slot-props02-scope-output.json | 30 ------------------- .../tutorial/slot-props03-scope-output.json | 30 ------------------- .../ast/tutorial/slots01-scope-output.json | 30 ------------------- .../ast/tutorial/slots02-scope-output.json | 30 ------------------- .../tutorial/spread-props01-scope-output.json | 30 ------------------- .../tutorial/spread-props02-scope-output.json | 30 ------------------- .../tutorial/spread-props03-scope-output.json | 30 ------------------- .../ast/tutorial/spring-scope-output.json | 30 ------------------- .../ast/tutorial/styling01-scope-output.json | 30 ------------------- .../ast/tutorial/styling02-scope-output.json | 30 ------------------- .../tutorial/svelte-body-scope-output.json | 30 ------------------- .../svelte-component-scope-output.json | 30 ------------------- .../svelte-document-scope-output.json | 30 ------------------- .../tutorial/svelte-element-scope-output.json | 30 ------------------- .../svelte-fragment-scope-output.json | 30 ------------------- .../tutorial/svelte-head-scope-output.json | 30 ------------------- .../svelte-options01-scope-output.json | 30 ------------------- .../svelte-options02-scope-output.json | 30 ------------------- .../svelte-options03-scope-output.json | 30 ------------------- .../tutorial/svelte-self01-scope-output.json | 30 ------------------- .../tutorial/svelte-self02-scope-output.json | 30 ------------------- .../tutorial/svelte-self03-scope-output.json | 30 ------------------- .../svelte-window-bindings-scope-output.json | 30 ------------------- .../tutorial/svelte-window-scope-output.json | 30 ------------------- .../tutorial/text-inputs01-scope-output.json | 30 ------------------- .../tutorial/text-inputs02-scope-output.json | 30 ------------------- .../textarea-inputs-scope-output.json | 30 ------------------- .../ast/tutorial/tick-scope-output.json | 30 ------------------- .../transition-events-scope-output.json | 30 ------------------- .../ast/tutorial/transition-scope-output.json | 30 ------------------- .../ast/tutorial/tweened-scope-output.json | 30 ------------------- .../ast/tutorial/update-scope-output.json | 30 ------------------- ...ating-arrays-and-objects-scope-output.json | 30 ------------------- .../writable-stores01-scope-output.json | 30 ------------------- .../writable-stores02-scope-output.json | 30 ------------------- .../writable-stores03-scope-output.json | 30 ------------------- .../writable-stores04-scope-output.json | 30 ------------------- .../ast/unknown-directive01-scope-output.json | 30 ------------------- .../unused-write-only-store-scope-output.json | 30 ------------------- 362 files changed, 10860 deletions(-) diff --git a/tests/fixtures/parser/ast/$$slots-scope-output.json b/tests/fixtures/parser/ast/$$slots-scope-output.json index 673549f1..8aa15e1c 100644 --- a/tests/fixtures/parser/ast/$$slots-scope-output.json +++ b/tests/fixtures/parser/ast/$$slots-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/$var-scope-output.json b/tests/fixtures/parser/ast/$var-scope-output.json index 52f7b07a..13a91319 100644 --- a/tests/fixtures/parser/ast/$var-scope-output.json +++ b/tests/fixtures/parser/ast/$var-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json index c8ae6c38..160b8416 100644 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/attr01-scope-output.json b/tests/fixtures/parser/ast/attr01-scope-output.json index c3dbd581..4f004ffa 100644 --- a/tests/fixtures/parser/ast/attr01-scope-output.json +++ b/tests/fixtures/parser/ast/attr01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await01-scope-output.json b/tests/fixtures/parser/ast/await01-scope-output.json index c0f0ebe9..b170929d 100644 --- a/tests/fixtures/parser/ast/await01-scope-output.json +++ b/tests/fixtures/parser/ast/await01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await02-scope-output.json b/tests/fixtures/parser/ast/await02-scope-output.json index 0bc4c394..6704dac2 100644 --- a/tests/fixtures/parser/ast/await02-scope-output.json +++ b/tests/fixtures/parser/ast/await02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/await04-scope-output.json b/tests/fixtures/parser/ast/await04-scope-output.json index 06b96b88..e57c558c 100644 --- a/tests/fixtures/parser/ast/await04-scope-output.json +++ b/tests/fixtures/parser/ast/await04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json index ba15bda3..c584f6b7 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output.json b/tests/fixtures/parser/ast/class-directive01-scope-output.json index 13050424..75d70de4 100644 --- a/tests/fixtures/parser/ast/class-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/class-directive01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/comments01-scope-output.json b/tests/fixtures/parser/ast/comments01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/comments01-scope-output.json +++ b/tests/fixtures/parser/ast/comments01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components01-scope-output.json b/tests/fixtures/parser/ast/components01-scope-output.json index 2a0a2128..17e5e2d9 100644 --- a/tests/fixtures/parser/ast/components01-scope-output.json +++ b/tests/fixtures/parser/ast/components01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components02-scope-output.json b/tests/fixtures/parser/ast/components02-scope-output.json index 2a0a2128..17e5e2d9 100644 --- a/tests/fixtures/parser/ast/components02-scope-output.json +++ b/tests/fixtures/parser/ast/components02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components03-scope-output.json b/tests/fixtures/parser/ast/components03-scope-output.json index ab70be02..91f06b95 100644 --- a/tests/fixtures/parser/ast/components03-scope-output.json +++ b/tests/fixtures/parser/ast/components03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/components04-scope-output.json b/tests/fixtures/parser/ast/components04-scope-output.json index 8f4748e9..f00b0217 100644 --- a/tests/fixtures/parser/ast/components04-scope-output.json +++ b/tests/fixtures/parser/ast/components04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json index 12225d9c..4547a110 100644 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json index d87484c5..b8a8cfb5 100644 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json index eff63b2b..8aa93825 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json index 527cf046..c694e3f0 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json index 45cb227d..f064f431 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json index c3551a31..abb9fc00 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json index c3551a31..abb9fc00 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json index af23cc7d..ef8a2d57 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json index 96844bfb..2c8006cb 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json index b403e0ef..3cdcc951 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json index bfd7f5e3..c8e221c7 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json index d03ae69e..dfaf5a6f 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json index fcbbbf3e..3ee5c6eb 100644 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json index c6a1ab3d..0f9803a2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json index 807785b8..77293f06 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json index bc595ac7..5b3e5d75 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json index f843bd67..78ba1afa 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json index bd4f854a..6feba977 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json index 1e760ff1..977fab12 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json index b0f85e07..73592d5d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json index 2d300aae..39dcd8a3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json index d567849b..781f2bad 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output.json @@ -42,36 +42,6 @@ "resolved": null } ] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json index c1e4bc99..73d599b9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json index da7e42dd..ba08f3d0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json index b83b22e8..ee12a1ef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json index 7d20324d..be8c1387 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json index ff0added..6e5bedff 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json index 6b7932b4..23b52e16 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json index eb7001f1..4cf23501 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json index 0806d4b7..199d1d2d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json index 260f6771..567b593c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json index 86f54016..2ff71892 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json index b39fa326..fc368aa3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json index 70a353d3..eeed2e9d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json index 90e63b27..af9742f9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json index 410df4db..75a0e1ef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json index 4e6a8f05..737039cd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json index 74c28fa9..bae39a01 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json index 6eb86596..494496fd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json index 5caac2fe..35082588 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json index 1eee26b9..9170b185 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json index 4b882ce4..098c8933 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json index af8a524c..5e4c6f4e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json index f0e465c2..e2252881 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json index 47d03c4f..efcebe07 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json index 930e32ef..1f125b60 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json index b55c7569..a948a091 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json index 4ff9185f..da97d137 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json index 04a7a76a..0b78d9c5 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json index 1285483c..5b6486ef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json index 27a6e988..50d8ac5c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json index 92149fe4..8b1f7a3b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json index 04f45e44..7c0a785e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json index 438aaa3c..d5a2f57e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json index aa686834..4612fa74 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json index 8641abdd..88c440ef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json index 8844edec..eb594d4d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json index 584430a8..a324fcdd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json index e309087c..b44c4c88 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json index 70bbcadf..96f2281a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json index a5dce38e..bea31b0e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json index a5dce38e..bea31b0e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json index 45c1e649..6118b7f7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json index 40285ac4..4e52f1e8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json index 2c844be0..72b271b2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json index 7a15d82b..765fa07c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json index f0ba7760..ef4ee42e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json index cf3278b8..c593403e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json index a7ec7460..99fab42b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json index 19e842f1..7f9e0483 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json index 907d5cc0..b24e5b1f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json index 2f397f17..3fed4aeb 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json index fea43fde..56146b73 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json index 8b795c32..7bad5ae1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json index 33b47392..6b8a9a75 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json index 2c394519..13267585 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json index 2e67a917..1f467c7a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json index 72bbde39..f22fdb21 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json index 72bbde39..f22fdb21 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json index 32af4568..abff00cc 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json index 6dd03101..cf4d0821 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json index e29a560a..2a6b92ee 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json index d51a8d5a..7f9dd719 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json index c7d4cb06..47c49438 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json index bec1c1cf..0f591c22 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json index 72fddc7c..a1c2fa57 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json index 8969f069..56a16148 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json index 66623446..5605059a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json index 45f3de32..fbbb5e42 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json index 0f63ed38..381c2ca8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json index 65418939..7141aab6 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json index e2277126..699043a7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json index 4a981aae..7a9359d0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json index fc061114..be31776c 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json index c75553c7..49859bb0 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json index bbcdc522..360c7fdd 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json index 378dc4ff..9845c2d8 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json index c162c11a..f76e8881 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json index 211fc75b..606b932b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json index fb3fd861..d6bc558d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json index 66f96972..edecea97 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json index 39523a9c..a23f7593 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json index dd690bb9..bcd9acb3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json index ed632d37..e77046d6 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json index 6accfc46..99ef9273 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json index 254773f0..b815e9e5 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json index d7355484..edb0ab26 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json index 39f734a8..437f8639 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json index ae2e9cb0..fc73df75 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json index 46ae567e..ff79b4f9 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json index d57aad1f..833f1994 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json index e4b9ebc5..b7452abe 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json index 709b59cf..e20a2ab1 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json index 0939605a..b91f71ce 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json index 5d1a05b2..0f0e4448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json index 1a1a1e4f..7e51c90e 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json index 73722a53..223b3770 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json index cfb4d937..e3be4aef 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json index 2b4f70cd..0b12bfe2 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json index 4847b237..2dbb0d2f 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json index 2d99361b..34802cb7 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json index ed632d37..e77046d6 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output.json b/tests/fixtures/parser/ast/each-with-comment-scope-output.json index 13e6a91d..6cf870a5 100644 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output.json +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output.json b/tests/fixtures/parser/ast/empty-elements01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output.json +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json index 46e96fe8..6947f25c 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json index f9f3b516..9dceaa1d 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json index b4d0dab2..882f9421 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json index 67643eaa..894f218b 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output.json b/tests/fixtures/parser/ast/html-comments01-scope-output.json index e03a07fa..dcf6176a 100644 --- a/tests/fixtures/parser/ast/html-comments01-scope-output.json +++ b/tests/fixtures/parser/ast/html-comments01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output.json b/tests/fixtures/parser/ast/i18n-test-scope-output.json index f05ee87c..084048b0 100644 --- a/tests/fixtures/parser/ast/i18n-test-scope-output.json +++ b/tests/fixtures/parser/ast/i18n-test-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json index 5fe113cc..e5f380e1 100644 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json index 7b3b453f..3e9b17eb 100644 --- a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json +++ b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json index 0dd91cb4..6d635a13 100644 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json index 7016569e..f1b3fe4b 100644 --- a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json +++ b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output.json index 8583c557..f418d6b1 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output.json +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/label01-scope-output.json b/tests/fixtures/parser/ast/label01-scope-output.json index b51dc638..1518de1c 100644 --- a/tests/fixtures/parser/ast/label01-scope-output.json +++ b/tests/fixtures/parser/ast/label01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output.json b/tests/fixtures/parser/ast/let-directive01-scope-output.json index 1f238128..d5b190b7 100644 --- a/tests/fixtures/parser/ast/let-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output.json b/tests/fixtures/parser/ast/let-directive02-scope-output.json index a23f0444..98dd33c3 100644 --- a/tests/fixtures/parser/ast/let-directive02-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output.json b/tests/fixtures/parser/ast/let-directive03-scope-output.json index af682329..8715fb62 100644 --- a/tests/fixtures/parser/ast/let-directive03-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output.json b/tests/fixtures/parser/ast/let-directive04-scope-output.json index f00d5214..c275de6d 100644 --- a/tests/fixtures/parser/ast/let-directive04-scope-output.json +++ b/tests/fixtures/parser/ast/let-directive04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json index 2e095a62..cfa04a30 100644 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props01-scope-output.json b/tests/fixtures/parser/ast/props01-scope-output.json index a65ca982..ef580033 100644 --- a/tests/fixtures/parser/ast/props01-scope-output.json +++ b/tests/fixtures/parser/ast/props01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props02-scope-output.json b/tests/fixtures/parser/ast/props02-scope-output.json index 0f4c42aa..14725437 100644 --- a/tests/fixtures/parser/ast/props02-scope-output.json +++ b/tests/fixtures/parser/ast/props02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props03-scope-output.json b/tests/fixtures/parser/ast/props03-scope-output.json index c6c13a11..26001b22 100644 --- a/tests/fixtures/parser/ast/props03-scope-output.json +++ b/tests/fixtures/parser/ast/props03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/props04-scope-output.json b/tests/fixtures/parser/ast/props04-scope-output.json index c6c13a11..26001b22 100644 --- a/tests/fixtures/parser/ast/props04-scope-output.json +++ b/tests/fixtures/parser/ast/props04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output.json index df1d684e..d60909e3 100644 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output.json +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json index 2da89d4d..b6c16cf5 100644 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json index 3e973d09..41a08566 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json index 545f3c68..61297f5f 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json index 67fc4df6..2ba87d16 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json index 0b51f1a1..7d5e035f 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json index b00da738..ccd58aa2 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json index e3ea65b7..7b0e08a4 100644 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json index 491dcfd0..a6953e56 100644 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json index 70b27a67..a1187832 100644 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json index f1c8d085..0ce45b7b 100644 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json index dd3a4ea2..416b0c2e 100644 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json index 79d70897..e856ab20 100644 --- a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json +++ b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/sass-scope-output.json b/tests/fixtures/parser/ast/sass-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/sass-scope-output.json +++ b/tests/fixtures/parser/ast/sass-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output.json b/tests/fixtures/parser/ast/script-in-style-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/script-in-style-scope-output.json +++ b/tests/fixtures/parser/ast/script-in-style-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/script-tag-scope-output.json b/tests/fixtures/parser/ast/script-tag-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/script-tag-scope-output.json +++ b/tests/fixtures/parser/ast/script-tag-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output.json +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output.json b/tests/fixtures/parser/ast/store-bindings-scope-output.json index 9a318f3b..f687cfa0 100644 --- a/tests/fixtures/parser/ast/store-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/store-bindings-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output.json b/tests/fixtures/parser/ast/style-directive01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/style-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/style-directive01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output.json b/tests/fixtures/parser/ast/style-directive02-scope-output.json index b2cadb59..e4c88be2 100644 --- a/tests/fixtures/parser/ast/style-directive02-scope-output.json +++ b/tests/fixtures/parser/ast/style-directive02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output.json b/tests/fixtures/parser/ast/style-directive03-scope-output.json index 4e5ca43c..c6111112 100644 --- a/tests/fixtures/parser/ast/style-directive03-scope-output.json +++ b/tests/fixtures/parser/ast/style-directive03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-global01-scope-output.json b/tests/fixtures/parser/ast/style-global01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/style-global01-scope-output.json +++ b/tests/fixtures/parser/ast/style-global01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-global02-scope-output.json b/tests/fixtures/parser/ast/style-global02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/style-global02-scope-output.json +++ b/tests/fixtures/parser/ast/style-global02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output.json b/tests/fixtures/parser/ast/style-in-script-scope-output.json index 8be3c32c..df77d617 100644 --- a/tests/fixtures/parser/ast/style-in-script-scope-output.json +++ b/tests/fixtures/parser/ast/style-in-script-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style01-scope-output.json b/tests/fixtures/parser/ast/style01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/style01-scope-output.json +++ b/tests/fixtures/parser/ast/style01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/style02-scope-output.json b/tests/fixtures/parser/ast/style02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/style02-scope-output.json +++ b/tests/fixtures/parser/ast/style02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json index 3cbffdf5..dde610ce 100644 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json index 58e9ef88..d7a9f934 100644 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output.json b/tests/fixtures/parser/ast/this-attr01-scope-output.json index 74955551..b728cf65 100644 --- a/tests/fixtures/parser/ast/this-attr01-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output.json b/tests/fixtures/parser/ast/this-attr02-scope-output.json index 8c61b3c3..d6e06927 100644 --- a/tests/fixtures/parser/ast/this-attr02-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output.json b/tests/fixtures/parser/ast/this-attr03-scope-output.json index 1a36ee04..6507504a 100644 --- a/tests/fixtures/parser/ast/this-attr03-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output.json b/tests/fixtures/parser/ast/this-attr04-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/this-attr04-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output.json b/tests/fixtures/parser/ast/this-attr05-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/this-attr05-scope-output.json +++ b/tests/fixtures/parser/ast/this-attr05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output.json index 9f943f84..a7744f2c 100644 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output.json +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$props01-scope-output.json b/tests/fixtures/parser/ast/ts-$$props01-scope-output.json index 0aa036ec..88771ee2 100644 --- a/tests/fixtures/parser/ast/ts-$$props01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$props01-scope-output.json @@ -66,36 +66,6 @@ "resolved": null } ] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json index f249603c..b6c5c412 100644 --- a/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots01-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json index f249603c..b6c5c412 100644 --- a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json index f249603c..b6c5c412 100644 --- a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json index f249603c..b6c5c412 100644 --- a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json +++ b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output.json @@ -42,36 +42,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json index cd38315b..4b25ba9f 100644 --- a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output.json b/tests/fixtures/parser/ast/ts-each01-scope-output.json index ffdd10d8..648672e7 100644 --- a/tests/fixtures/parser/ast/ts-each01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-each01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output.json b/tests/fixtures/parser/ast/ts-event01-scope-output.json index fc8478f2..3f372d59 100644 --- a/tests/fixtures/parser/ast/ts-event01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output.json b/tests/fixtures/parser/ast/ts-event02-scope-output.json index 0cf44528..6b6626a5 100644 --- a/tests/fixtures/parser/ast/ts-event02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output.json b/tests/fixtures/parser/ast/ts-event03-scope-output.json index 656a23db..81e1dedf 100644 --- a/tests/fixtures/parser/ast/ts-event03-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output.json b/tests/fixtures/parser/ast/ts-event04-scope-output.json index 19c26dc8..aeef6d56 100644 --- a/tests/fixtures/parser/ast/ts-event04-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output.json b/tests/fixtures/parser/ast/ts-event05-scope-output.json index 4e4255e2..260ec34f 100644 --- a/tests/fixtures/parser/ast/ts-event05-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output.json b/tests/fixtures/parser/ast/ts-event06-scope-output.json index 466cfcc8..6bf44ff7 100644 --- a/tests/fixtures/parser/ast/ts-event06-scope-output.json +++ b/tests/fixtures/parser/ast/ts-event06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output.json b/tests/fixtures/parser/ast/ts-issue226-scope-output.json index f686e158..26998ce8 100644 --- a/tests/fixtures/parser/ast/ts-issue226-scope-output.json +++ b/tests/fixtures/parser/ast/ts-issue226-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json index 68db634a..85cf239b 100644 --- a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output.json b/tests/fixtures/parser/ast/ts-newline-scope-output.json index a09008a9..f76efcb8 100644 --- a/tests/fixtures/parser/ast/ts-newline-scope-output.json +++ b/tests/fixtures/parser/ast/ts-newline-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json index ca2b2075..133d412f 100644 --- a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output.json b/tests/fixtures/parser/ast/ts-promise01-scope-output.json index 7ddf379e..5c2dda73 100644 --- a/tests/fixtures/parser/ast/ts-promise01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-promise01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output.json b/tests/fixtures/parser/ast/ts-promise02-scope-output.json index 0417e4a8..5c38953b 100644 --- a/tests/fixtures/parser/ast/ts-promise02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-promise02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output.json index fe02aad0..6c8b5589 100644 --- a/tests/fixtures/parser/ast/ts-reactive01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output.json index abc349b2..2c0d503f 100644 --- a/tests/fixtures/parser/ast/ts-reactive02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output.json index 9ce5e535..d0233285 100644 --- a/tests/fixtures/parser/ast/ts-reactive03-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output.json index c72a2998..08efafb6 100644 --- a/tests/fixtures/parser/ast/ts-reactive04-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output.json index 5b089e63..5868c3d3 100644 --- a/tests/fixtures/parser/ast/ts-reactive05-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive05-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output.json index 95fcbb9e..10e688c5 100644 --- a/tests/fixtures/parser/ast/ts-reactive06-scope-output.json +++ b/tests/fixtures/parser/ast/ts-reactive06-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json index c3e4d86b..82916d7b 100644 --- a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json index ab4d224b..cf076acd 100644 --- a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output.json b/tests/fixtures/parser/ast/ts-store01-scope-output.json index 56751e55..e3e48d32 100644 --- a/tests/fixtures/parser/ast/ts-store01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-store01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output.json b/tests/fixtures/parser/ast/ts-store02-scope-output.json index 1bfc506f..59d4ba2a 100644 --- a/tests/fixtures/parser/ast/ts-store02-scope-output.json +++ b/tests/fixtures/parser/ast/ts-store02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output.json b/tests/fixtures/parser/ast/ts-store03-scope-output.json index 8fd524b0..db945206 100644 --- a/tests/fixtures/parser/ast/ts-store03-scope-output.json +++ b/tests/fixtures/parser/ast/ts-store03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output.json b/tests/fixtures/parser/ast/ts-use01-scope-output.json index 5dc49a79..91a012c6 100644 --- a/tests/fixtures/parser/ast/ts-use01-scope-output.json +++ b/tests/fixtures/parser/ast/ts-use01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output.json index 4ab995a6..8e268574 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json index 46e96fe8..6947f25c 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json index b97f9daf..478f1ddf 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json index ea6aae9f..b8fd24ef 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output.json index 72f4b5e7..4c6db18a 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json index b50b49b9..22c39e5a 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json index 3b06752b..f49f0151 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json index aa286c67..7034920d 100644 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json index c4bfa0d1..3f484d38 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json index 5779f6ed..80dd0940 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output.json index 93f027b8..4cbabbe0 100644 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json index a8d313ab..4d4d4df8 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json index 26140a9f..3949b715 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json index 096352ed..2f6834ad 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json index 520e306f..802d02d1 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json index 08a2ec32..ecba3001 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json index 8a66d688..7d818404 100644 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json index dc8fee14..fa150e89 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json index 9b752a12..7f4ea7b5 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json index 5ce8b58e..94abca35 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json index c67b0d06..d9dfaad7 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json index a6ad99c6..22ba8855 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json index 4ad1f6b6..f8f2fd1c 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json index 32229d1a..b4383e8b 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json index 4e878fb9..49ccd447 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json index 3ec8116f..abf9aefd 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json index c31a8d5d..045eb8b9 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json index 07c48bbc..c2e1562f 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json index c31a8d5d..045eb8b9 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json index 0487c083..3ff37e2b 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json index f2f8b624..de8ad023 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json index e3a07296..95cc1601 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json index e54bcc78..9694da1d 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json index 6fd75e21..9b6180d3 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json index b9a04aeb..d444e2c1 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json index 69aaebdd..826fddf0 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json index cb96922e..b68a286f 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json index c9c643a2..2ff11068 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json index 39bc0800..31e48a68 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json index 0282a0c4..103d301c 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json index 5ab91c95..0750fe26 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json index 228ddae8..b6d37d55 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json index 8a89f21f..3148c422 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json index 520e306f..802d02d1 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json index 826f25a6..d2b520ce 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json index ddb7bae8..247f30d0 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json index 512ec7e3..0c32ef75 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json index 0015eaf6..7e087144 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json index 3a667796..50465ea7 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json index a4d7b8f6..9352f3d3 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json index 5511b08b..60ed4d1c 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json index 1c40e5a2..36b838c1 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json index d14c7bc2..7b083aec 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json index e790a128..29606a3d 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json index e1c7a138..af378fb0 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json index 231d7bf1..90b0c54a 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json index 5a27f922..d481bb78 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json index 3a433098..e277ad25 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json index 1ab1442e..02e1e272 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json index abb34b09..fd1807df 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json index dbe14f8d..fbd69ca8 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json index 5d8660e6..6d748fad 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json index 0dcb13a6..1341eafc 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json index 25331dd1..d03483ce 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json index 72b0d3e8..f5fc6fca 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json index c5cf427c..5495b9f4 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json index 409d9361..9fa49c89 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json index aa683a62..0ad83ba1 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output.json @@ -65,36 +65,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json index 61f318c4..1975ce7d 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json index 1bdd20c0..314a82cd 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json index 8193ed1e..73bf0370 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json index 47db0d03..a153a661 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json index af03e5cf..7df7d267 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json index 2a533e00..8aea8a11 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json index 8c8e2c3c..c730ce47 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json index 10df24eb..d42ad87c 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json index 6b62e0b3..a1c47e26 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json index ff33861e..dbcfec92 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json index 9c3ac71e..569c1948 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json index 2bcbc4fe..0f871208 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json index ccaaf775..deed7fcd 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json index faa49206..618f808d 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json index 12b40a8b..21f1f680 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output.json index 8cc22f29..c39f7097 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json index eb9608a8..9bb07114 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json index 5de76ff9..a3748aef 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json index f7fd8ea8..8e6c9ce7 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json index 3e1b929d..1ffb9b82 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json index 192a2d80..07f410db 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json index 4c868271..d392ca4b 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json index 214fd6c1..aa5d1b86 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json index 4a1358cd..c3e51915 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json index 74b4083e..b73251da 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json index 09e7dd38..66141254 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json index c05d8eca..4c39c697 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json index 3f9cee0a..b9abbfc6 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json index f152a4e2..9f544b73 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json index ee2640d0..0bd63273 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json index c3606b93..19ee68bb 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json index b5e413cd..4a5b1da7 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json index 9d188d72..814aebfa 100644 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output.json index ac4bbc96..cd8da317 100644 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json index a79784f4..91b57371 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output.json index c20e0036..65393d1c 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json index 57e1d786..ed9f8f1d 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output.json b/tests/fixtures/parser/ast/tutorial/update-scope-output.json index fb693c1a..279f54e3 100644 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json index f708a62c..95c9626b 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json index 23a92ab1..5e2a8352 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json index 4fe41975..7c0d6b94 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json index eef95c8d..584f544c 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json index fe3cfe5c..82bf78d5 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output.json index e469cab1..796fe41b 100644 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output.json +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json index af2faece..239c877d 100644 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output.json @@ -18,36 +18,6 @@ "identifiers": [], "defs": [], "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] } ], "references": [], From 8c334b35f49d763e1f913e45e5ac02cbe7511781 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:21:58 +0900 Subject: [PATCH 12/27] update ci --- .github/workflows/NodeCI.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/NodeCI.yml b/.github/workflows/NodeCI.yml index 2c07f1ca..7cc58601 100644 --- a/.github/workflows/NodeCI.yml +++ b/.github/workflows/NodeCI.yml @@ -35,13 +35,27 @@ jobs: run: pnpm install - name: Test run: pnpm run test - test-for-svelte-v4: + test-for-svelte-v5: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v2 - name: Use Node.js uses: actions/setup-node@v4 + - name: Install Packages + run: pnpm install + - name: Test + run: pnpm run test + + test-for-svelte-v4: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - name: Install Svelte v4 run: |+ pnpm install -D svelte@4 @@ -50,6 +64,7 @@ jobs: run: pnpm install - name: Test run: pnpm run test + test-for-svelte-v3: runs-on: ubuntu-latest strategy: @@ -138,6 +153,10 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 18 + - name: Install Svelte v4 + run: |+ + pnpm install -D svelte@4 + rm -rf node_modules - name: Install Packages run: pnpm install - name: Update fixtures From 18775dd8f71f5572e45829630805d1aa02b37748 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:24:01 +0900 Subject: [PATCH 13/27] fix ci --- .github/workflows/NodeCI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/NodeCI.yml b/.github/workflows/NodeCI.yml index 7cc58601..e6884964 100644 --- a/.github/workflows/NodeCI.yml +++ b/.github/workflows/NodeCI.yml @@ -163,6 +163,7 @@ jobs: run: pnpm run update-fixtures - name: Check changes run: | + git co package.json && \ git add --all && \ git diff-index --cached HEAD --stat --exit-code test-and-coverage: From 33031fb37d459d8e8c03516f4a03e229d809ec52 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:26:26 +0900 Subject: [PATCH 14/27] co -> checkout --- .github/workflows/NodeCI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/NodeCI.yml b/.github/workflows/NodeCI.yml index e6884964..d2b0ac80 100644 --- a/.github/workflows/NodeCI.yml +++ b/.github/workflows/NodeCI.yml @@ -163,7 +163,7 @@ jobs: run: pnpm run update-fixtures - name: Check changes run: | - git co package.json && \ + git checkout package.json && \ git add --all && \ git diff-index --cached HEAD --stat --exit-code test-and-coverage: From 1d9e7aba3f912ee830a858bf63cd73c9e192e871 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:44:31 +0900 Subject: [PATCH 15/27] add rune tests --- src/parser/globals.ts | 2 +- src/parser/typescript/analyze/index.ts | 33 +- .../ast/$$slots-scope-output-svelte5.json | 2 +- .../parser/ast/$var-scope-output-svelte5.json | 2 +- ...within-component-scope-output-svelte5.json | 2 +- .../ast/attr01-scope-output-svelte5.json | 2 +- .../ast/await01-scope-output-svelte5.json | 2 +- .../ast/await02-scope-output-svelte5.json | 2 +- .../ast/await04-scope-output-svelte5.json | 10 +- ...rite-less-code01-scope-output-svelte5.json | 2 +- ...lass-directive01-scope-output-svelte5.json | 2 +- .../ast/comments01-scope-output-svelte5.json | 2 +- .../components01-scope-output-svelte5.json | 2 +- .../components02-scope-output-svelte5.json | 2 +- .../components03-scope-output-svelte5.json | 2 +- .../components04-scope-output-svelte5.json | 2 +- ...n-with-expr-like-scope-output-svelte5.json | 2 +- ...ve-use-with-expr-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../06-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../03-style/01-scope-output-svelte5.json | 2 +- .../03-style/02-scope-output-svelte5.json | 2 +- .../03-style/03-scope-output-svelte5.json | 2 +- .../03-style/04-scope-output-svelte5.json | 2 +- .../01-tags/01-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../06-scope-output-svelte5.json | 2 +- .../07-scope-output-svelte5.json | 2 +- .../08-scope-output-svelte5.json | 2 +- .../09-scope-output-svelte5.json | 2 +- .../10-scope-output-svelte5.json | 2 +- .../11-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../04-comments/01-scope-output-svelte5.json | 2 +- .../04-comments/02-scope-output-svelte5.json | 2 +- .../05-hash-if/01-scope-output-svelte5.json | 2 +- .../05-hash-if/02-scope-output-svelte5.json | 2 +- .../05-hash-if/03-scope-output-svelte5.json | 2 +- .../06-hash-each/01-scope-output-svelte5.json | 2 +- .../06-hash-each/02-scope-output-svelte5.json | 2 +- .../06-hash-each/03-scope-output-svelte5.json | 2 +- .../06-hash-each/04-scope-output-svelte5.json | 2 +- .../06-hash-each/05-scope-output-svelte5.json | 2 +- .../06-hash-each/06-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../08-hash-key/01-scope-output-svelte5.json | 2 +- .../08-hash-key/02-scope-output-svelte5.json | 2 +- .../08-hash-key/03-scope-output-svelte5.json | 2 +- .../09-at-html/01-scope-output-svelte5.json | 2 +- .../09-at-html/02-scope-output-svelte5.json | 2 +- .../10-at-debug/01-scope-output-svelte5.json | 2 +- .../10-at-debug/02-scope-output-svelte5.json | 2 +- .../10-at-debug/03-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../06-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../06-scope-output-svelte5.json | 2 +- .../07-scope-output-svelte5.json | 2 +- .../08-scope-output-svelte5.json | 2 +- .../09-scope-output-svelte5.json | 2 +- .../10-scope-output-svelte5.json | 2 +- .../11-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../04-bind-this/01-scope-output-svelte5.json | 2 +- .../04-bind-this/02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../02.1-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../05-ts-scope-output-svelte5.json | 10 +- .../06-scope-output-svelte5.json | 2 +- .../07-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../05-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../04-bind-this/01-scope-output-svelte5.json | 2 +- .../04-bind-this/02-scope-output-svelte5.json | 2 +- .../13-slot/00/01-scope-output-svelte5.json | 2 +- .../13-slot/00/02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../02-$$slots/01-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../03-scope-output-svelte5.json | 2 +- .../04-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../02-scope-output-svelte5.json | 2 +- .../01-scope-output-svelte5.json | 2 +- ...ach-with-comment-scope-output-svelte5.json | 2 +- ...empty-elements01-scope-output-svelte5.json | 2 +- .../hello-world01-scope-output-svelte5.json | 2 +- .../hello-world02-scope-output-svelte5.json | 2 +- .../hello-world03-scope-output-svelte5.json | 2 +- .../hello-world04-scope-output-svelte5.json | 2 +- .../hello-world05-scope-output-svelte5.json | 2 +- .../html-comments01-scope-output-svelte5.json | 2 +- .../ast/i18n-test-scope-output-svelte5.json | 10 +- .../dot-in-bind01-scope-output-svelte5.json | 2 +- ...nt-plugin-svelte-scope-output-svelte5.json | 10 +- ...nt-plugin-svelte-scope-output-svelte5.json | 2 +- ...nt-plugin-svelte-scope-output-svelte5.json | 10 +- .../kit-demo-home-scope-output-svelte5.json | 2 +- .../ast/label01-scope-output-svelte5.json | 2 +- .../let-directive01-scope-output-svelte5.json | 2 +- .../let-directive02-scope-output-svelte5.json | 2 +- .../let-directive03-scope-output-svelte5.json | 2 +- .../let-directive04-scope-output-svelte5.json | 10 +- ...che-with-comment-scope-output-svelte5.json | 2 +- ...ing-script-tag01-scope-output-svelte5.json | 2 +- .../ast/props01-scope-output-svelte5.json | 2 +- .../ast/props02-scope-output-svelte5.json | 2 +- .../ast/props03-scope-output-svelte5.json | 2 +- .../ast/props04-scope-output-svelte5.json | 2 +- .../pug/each/each01-scope-output-svelte5.json | 2 +- ...closing-template-scope-output-svelte5.json | 2 +- ...th-destructure01-scope-output-svelte5.json | 2 +- ...th-destructure02-scope-output-svelte5.json | 2 +- ...th-destructure03-scope-output-svelte5.json | 2 +- ...th-destructure04-scope-output-svelte5.json | 2 +- ...th-destructure05-scope-output-svelte5.json | 2 +- ...ive-with-store01-scope-output-svelte5.json | 2 +- ...ive-with-store02-scope-output-svelte5.json | 2 +- ...ctive-with-var01-scope-output-svelte5.json | 2 +- ...ctive-with-var02-scope-output-svelte5.json | 2 +- ...ctive-with-var03-scope-output-svelte5.json | 2 +- ...ve-with-var04-ts-scope-output-svelte5.json | 10 +- .../parser/ast/sass-scope-output-svelte5.json | 2 +- .../script-in-style-scope-output-svelte5.json | 2 +- .../ast/script-tag-scope-output-svelte5.json | 2 +- ...-closing-style01-scope-output-svelte5.json | 2 +- .../store-bindings-scope-output-svelte5.json | 2 +- ...tyle-directive01-scope-output-svelte5.json | 2 +- ...tyle-directive02-scope-output-svelte5.json | 2 +- ...tyle-directive03-scope-output-svelte5.json | 2 +- .../style-global01-scope-output-svelte5.json | 2 +- .../style-global02-scope-output-svelte5.json | 2 +- .../style-in-script-scope-output-svelte5.json | 2 +- .../ast/style01-scope-output-svelte5.json | 2 +- .../ast/style02-scope-output-svelte5.json | 2 +- ...t-with-bind-this-scope-output-svelte5.json | 2 +- .../example01-input.svelte | 24 + .../example01-no-unused-vars-result.json | 14 + .../example01-output.json | 4485 ++++++++++ .../example01-scope-output-svelte5.json | 122 + .../example01-scope-output.json | 5771 +++++++++++++ .../docs/functions/01-untrack-input.svelte | 12 + .../docs/functions/01-untrack-output.json | 1779 ++++ .../01-untrack-prefer-const-result.json | 14 + .../01-untrack-scope-output-svelte5.json | 100 + .../functions/01-untrack-scope-output.json | 1537 ++++ .../docs/old-vs-new/01-counter-input.svelte | 14 + .../docs/old-vs-new/01-counter-output.json | 2336 +++++ .../01-counter-prefer-const-result.json | 8 + .../01-counter-scope-output-svelte5.json | 124 + .../old-vs-new/01-counter-scope-output.json | 1372 +++ .../02-tracking-dependencies-input.svelte | 13 + .../02-tracking-dependencies-output.json | 3189 +++++++ ...king-dependencies-prefer-const-result.json | 8 + ...ing-dependencies-scope-output-svelte5.json | 123 + ...02-tracking-dependencies-scope-output.json | 1684 ++++ .../03-untracking-dependencies-input.svelte | 15 + .../03-untracking-dependencies-output.json | 3574 ++++++++ ...king-dependencies-prefer-const-result.json | 8 + ...ing-dependencies-scope-output-svelte5.json | 123 + ...-untracking-dependencies-scope-output.json | 1967 +++++ .../04-simple-component-props-input.svelte | 5 + .../04-simple-component-props-output.json | 732 ++ ...e-component-props-prefer-const-result.json | 8 + ...-component-props-scope-output-svelte5.json | 76 + ...4-simple-component-props-scope-output.json | 585 ++ .../05-advanced-component-props-input.svelte | 7 + .../05-advanced-component-props-output.json | 1387 +++ ...d-component-props-prefer-const-result.json | 14 + ...advanced-component-props-requirements.json | 5 + ...-component-props-scope-output-svelte5.json | 76 + ...advanced-component-props-scope-output.json | 947 +++ .../old-vs-new/06-autoscroll-input.svelte | 48 + .../06-autoscroll-no-undef-result.json | 20 + ...toscroll-no-unused-expressions-result.json | 8 + .../docs/old-vs-new/06-autoscroll-output.json | 7513 +++++++++++++++++ .../06-autoscroll-prefer-const-result.json | 8 + .../06-autoscroll-scope-output-svelte5.json | 123 + .../06-autoscroll-scope-output.json | 6265 ++++++++++++++ .../svelte5/docs/runes/01-$state-input.svelte | 7 + .../svelte5/docs/runes/01-$state-output.json | 1224 +++ .../runes/01-$state-scope-output-svelte5.json | 76 + .../docs/runes/01-$state-scope-output.json | 489 ++ .../docs/runes/02-$derived-input.svelte | 10 + .../docs/runes/02-$derived-output.json | 2040 +++++ .../02-$derived-prefer-const-result.json | 8 + .../02-$derived-scope-output-svelte5.json | 100 + .../docs/runes/02-$derived-scope-output.json | 971 +++ .../docs/runes/03-$effect-input.svelte | 24 + .../svelte5/docs/runes/03-$effect-output.json | 3251 +++++++ .../runes/03-$effect-prefer-const-result.json | 8 + .../03-$effect-scope-output-svelte5.json | 124 + .../docs/runes/03-$effect-scope-output.json | 1664 ++++ .../docs/runes/04-$effect-pre-input.svelte | 28 + ...fect-pre-no-unused-expressions-result.json | 8 + .../docs/runes/04-$effect-pre-output.json | 3771 +++++++++ .../04-$effect-pre-prefer-const-result.json | 8 + .../04-$effect-pre-scope-output-svelte5.json | 76 + .../runes/04-$effect-pre-scope-output.json | 2152 +++++ .../svelte5/docs/runes/05-$props-input.svelte | 3 + .../05-$props-no-unused-vars-result.json | 14 + .../svelte5/docs/runes/05-$props-output.json | 699 ++ .../runes/05-$props-prefer-const-result.json | 14 + .../runes/05-$props-scope-output-svelte5.json | 76 + .../docs/runes/05-$props-scope-output.json | 913 ++ .../svelte5/docs/runes/06-$props-input.svelte | 3 + .../06-$props-no-unused-vars-result.json | 8 + .../svelte5/docs/runes/06-$props-output.json | 570 ++ .../runes/06-$props-prefer-const-result.json | 8 + .../docs/runes/06-$props-requirements.json | 5 + .../runes/06-$props-scope-output-svelte5.json | 76 + .../docs/runes/06-$props-scope-output.json | 389 + .../svelte5/docs/runes/07-$props-input.svelte | 3 + .../07-$props-no-unused-vars-result.json | 26 + .../svelte5/docs/runes/07-$props-output.json | 809 ++ .../runes/07-$props-prefer-const-result.json | 26 + .../runes/07-$props-scope-output-svelte5.json | 76 + .../docs/runes/07-$props-scope-output.json | 1759 ++++ .../docs/runes/08-$props-ts-input.svelte | 4 + .../08-$props-ts-no-unused-vars-result.json | 26 + .../docs/runes/08-$props-ts-output.json | 1208 +++ .../08-$props-ts-prefer-const-result.json | 26 + .../docs/runes/08-$props-ts-requirements.json | 8 + .../08-$props-ts-scope-output-svelte5.json | 70 + .../docs/runes/08-$props-ts-scope-output.json | 2160 +++++ .../docs/runes/09-how-to-opt-in-input.svelte | 2 + .../docs/runes/09-how-to-opt-in-output.json | 390 + ...09-how-to-opt-in-scope-output-svelte5.json | 52 + .../runes/09-how-to-opt-in-scope-output.json | 58 + .../docs/universal-reactivity/01-input.svelte | 11 + .../docs/universal-reactivity/01-output.json | 1421 ++++ .../01-scope-output-svelte5.json | 76 + .../universal-reactivity/01-scope-output.json | 715 ++ .../docs/universal-reactivity/02-input.svelte | 20 + .../docs/universal-reactivity/02-output.json | 2411 ++++++ .../02-scope-output-svelte5.json | 76 + .../universal-reactivity/02-scope-output.json | 1645 ++++ .../universal-reactivity/03-input.svelte.js | 14 + .../docs/universal-reactivity/03-output.json | 1270 +++ .../universal-reactivity/03-scope-output.json | 1251 +++ .../03-ts-input.svelte.ts | 14 + .../universal-reactivity/03-ts-output.json | 1271 +++ .../03-ts-scope-output.json | 1251 +++ .../03-ts-type-output.svelte.ts | 14 + .../ts-$state01-scope-output-svelte5.json | 93 + .../ast/svelte5/ts-$state01-scope-output.json | 197 +- ...rly-spacing-test-scope-output-svelte5.json | 2 +- .../ast/this-attr01-scope-output-svelte5.json | 2 +- .../ast/this-attr02-scope-output-svelte5.json | 2 +- .../ast/this-attr03-scope-output-svelte5.json | 2 +- .../ast/this-attr04-scope-output-svelte5.json | 2 +- .../ast/this-attr05-scope-output-svelte5.json | 2 +- ...ailing-comment01-scope-output-svelte5.json | 2 +- .../ts-$$props01-scope-output-svelte5.json | 10 +- .../ts-$$slots01-scope-output-svelte5.json | 10 +- ...$slots02-no-slot-scope-output-svelte5.json | 10 +- ...-$$slots03-named-scope-output-svelte5.json | 10 +- ...-$$slots04-named-scope-output-svelte5.json | 10 +- ...it-non-promise01-scope-output-svelte5.json | 10 +- .../ast/ts-each01-scope-output-svelte5.json | 10 +- .../ast/ts-event01-scope-output-svelte5.json | 10 +- .../ast/ts-event02-scope-output-svelte5.json | 10 +- .../ast/ts-event03-scope-output-svelte5.json | 10 +- .../ast/ts-event04-scope-output-svelte5.json | 10 +- .../ast/ts-event05-scope-output-svelte5.json | 10 +- .../ast/ts-event06-scope-output-svelte5.json | 10 +- .../ast/ts-issue226-scope-output-svelte5.json | 10 +- .../ts-let/ts-let01-scope-output-svelte5.json | 10 +- .../ast/ts-newline-scope-output-svelte5.json | 10 +- ...s-not-reactive01-scope-output-svelte5.json | 10 +- .../ts-promise01-scope-output-svelte5.json | 10 +- .../ts-promise02-scope-output-svelte5.json | 10 +- .../ts-reactive01-scope-output-svelte5.json | 10 +- .../ts-reactive02-scope-output-svelte5.json | 10 +- .../ts-reactive03-scope-output-svelte5.json | 10 +- .../ts-reactive04-scope-output-svelte5.json | 10 +- .../ts-reactive05-scope-output-svelte5.json | 10 +- .../ts-reactive06-scope-output-svelte5.json | 10 +- ...ts-scope-issue01-scope-output-svelte5.json | 10 +- ...shorthand-attr01-scope-output-svelte5.json | 10 +- .../ast/ts-store01-scope-output-svelte5.json | 10 +- .../ast/ts-store02-scope-output-svelte5.json | 10 +- .../ast/ts-store03-scope-output-svelte5.json | 10 +- .../ast/ts-use01-scope-output-svelte5.json | 10 +- .../actions-scope-output-svelte5.json | 2 +- .../adding-data-scope-output-svelte5.json | 2 +- ...eters-to-actions-scope-output-svelte5.json | 2 +- ...s-to-transitions-scope-output-svelte5.json | 2 +- .../animate-scope-output-svelte5.json | 2 +- ...-subscriptions01-scope-output-svelte5.json | 2 +- .../await-blocks-scope-output-svelte5.json | 2 +- .../tutorial/basics-scope-output-svelte5.json | 2 +- .../bind-this-scope-output-svelte5.json | 2 +- .../checkbox-inputs-scope-output-svelte5.json | 2 +- .../class-shorthand-scope-output-svelte5.json | 2 +- .../classes-scope-output-svelte5.json | 2 +- ...onent-bindings01-scope-output-svelte5.json | 2 +- ...onent-bindings02-scope-output-svelte5.json | 2 +- ...mponent-events01-scope-output-svelte5.json | 2 +- ...mponent-events02-scope-output-svelte5.json | 2 +- .../congratulations-scope-output-svelte5.json | 2 +- ...ditable-bindings-scope-output-svelte5.json | 2 +- .../context-api01-scope-output-svelte5.json | 2 +- .../context-api02-scope-output-svelte5.json | 2 +- .../context-api03-scope-output-svelte5.json | 2 +- ...ss-transitions01-scope-output-svelte5.json | 2 +- ...ss-transitions02-scope-output-svelte5.json | 2 +- ...m-js-transitions-scope-output-svelte5.json | 2 +- .../custom-stores-scope-output-svelte5.json | 2 +- .../debug01-scope-output-svelte5.json | 2 +- .../debug02-scope-output-svelte5.json | 2 +- ...eclaring-props01-scope-output-svelte5.json | 2 +- ...eclaring-props02-scope-output-svelte5.json | 2 +- ...default-values01-scope-output-svelte5.json | 2 +- ...default-values02-scope-output-svelte5.json | 2 +- ...rred-transitions-scope-output-svelte5.json | 2 +- .../derived-stores-scope-output-svelte5.json | 2 +- .../dimensions-scope-output-svelte5.json | 2 +- ...ent-forwarding01-scope-output-svelte5.json | 2 +- ...ent-forwarding02-scope-output-svelte5.json | 2 +- .../dom-events-scope-output-svelte5.json | 2 +- ...namic-attributes-scope-output-svelte5.json | 2 +- ...h-block-bindings-scope-output-svelte5.json | 2 +- .../each-blocks01-scope-output-svelte5.json | 2 +- .../each-blocks02-scope-output-svelte5.json | 2 +- .../else-blocks-scope-output-svelte5.json | 2 +- ...else-if-blocks01-scope-output-svelte5.json | 2 +- ...else-if-blocks02-scope-output-svelte5.json | 2 +- ...ent-forwarding01-scope-output-svelte5.json | 2 +- ...ent-forwarding02-scope-output-svelte5.json | 2 +- ...ent-forwarding03-scope-output-svelte5.json | 2 +- ...ent-forwarding04-scope-output-svelte5.json | 2 +- .../event-modifiers-scope-output-svelte5.json | 2 +- .../group-inputs-scope-output-svelte5.json | 2 +- .../html-tags01-scope-output-svelte5.json | 2 +- .../html-tags02-scope-output-svelte5.json | 2 +- .../if-blocks-scope-output-svelte5.json | 2 +- .../in-and-out-scope-output-svelte5.json | 2 +- .../inline-handlers-scope-output-svelte5.json | 2 +- ...eyed-each-blocks-scope-output-svelte5.json | 2 +- ...ocal-transitions-scope-output-svelte5.json | 2 +- .../media-elements-scope-output-svelte5.json | 2 +- ...module-exports01-scope-output-svelte5.json | 2 +- ...module-exports02-scope-output-svelte5.json | 2 +- ...-select-bindings-scope-output-svelte5.json | 2 +- .../named-slots01-scope-output-svelte5.json | 2 +- .../named-slots02-scope-output-svelte5.json | 2 +- ...ted-components01-scope-output-svelte5.json | 2 +- ...ted-components02-scope-output-svelte5.json | 2 +- ...numeric-inputs01-scope-output-svelte5.json | 2 +- ...numeric-inputs02-scope-output-svelte5.json | 2 +- .../ondestroy-scope-output-svelte5.json | 2 +- .../onmount-scope-output-svelte5.json | 2 +- ...optional-slots01-scope-output-svelte5.json | 2 +- ...optional-slots02-scope-output-svelte5.json | 2 +- ...optional-slots03-scope-output-svelte5.json | 2 +- ...tive-assignments-scope-output-svelte5.json | 2 +- ...ive-declarations-scope-output-svelte5.json | 2 +- ...ctive-statements-scope-output-svelte5.json | 2 +- .../readable-stores-scope-output-svelte5.json | 2 +- .../select-bindings-scope-output-svelte5.json | 2 +- .../sharing-code01-scope-output-svelte5.json | 2 +- .../sharing-code02-scope-output-svelte5.json | 2 +- ...slot-fallbacks01-scope-output-svelte5.json | 2 +- ...slot-fallbacks02-scope-output-svelte5.json | 2 +- .../slot-props01-scope-output-svelte5.json | 2 +- .../slot-props02-scope-output-svelte5.json | 2 +- .../slot-props03-scope-output-svelte5.json | 2 +- .../slots01-scope-output-svelte5.json | 2 +- .../slots02-scope-output-svelte5.json | 2 +- .../spread-props01-scope-output-svelte5.json | 2 +- .../spread-props02-scope-output-svelte5.json | 2 +- .../spread-props03-scope-output-svelte5.json | 2 +- .../tutorial/spring-scope-output-svelte5.json | 2 +- .../styling01-scope-output-svelte5.json | 2 +- .../styling02-scope-output-svelte5.json | 2 +- .../svelte-body-scope-output-svelte5.json | 2 +- ...svelte-component-scope-output-svelte5.json | 2 +- .../svelte-document-scope-output-svelte5.json | 2 +- .../svelte-element-scope-output-svelte5.json | 2 +- .../svelte-fragment-scope-output-svelte5.json | 2 +- .../svelte-head-scope-output-svelte5.json | 2 +- ...svelte-options01-scope-output-svelte5.json | 2 +- ...svelte-options02-scope-output-svelte5.json | 2 +- ...svelte-options03-scope-output-svelte5.json | 2 +- .../svelte-self01-scope-output-svelte5.json | 2 +- .../svelte-self02-scope-output-svelte5.json | 2 +- .../svelte-self03-scope-output-svelte5.json | 2 +- ...-window-bindings-scope-output-svelte5.json | 2 +- .../svelte-window-scope-output-svelte5.json | 2 +- .../text-inputs01-scope-output-svelte5.json | 2 +- .../text-inputs02-scope-output-svelte5.json | 2 +- .../textarea-inputs-scope-output-svelte5.json | 2 +- .../tutorial/tick-scope-output-svelte5.json | 2 +- ...ransition-events-scope-output-svelte5.json | 2 +- .../transition-scope-output-svelte5.json | 2 +- .../tweened-scope-output-svelte5.json | 2 +- .../tutorial/update-scope-output-svelte5.json | 2 +- ...rays-and-objects-scope-output-svelte5.json | 2 +- ...ritable-stores01-scope-output-svelte5.json | 2 +- ...ritable-stores02-scope-output-svelte5.json | 2 +- ...ritable-stores03-scope-output-svelte5.json | 2 +- ...ritable-stores04-scope-output-svelte5.json | 2 +- ...nown-directive01-scope-output-svelte5.json | 2 +- ...write-only-store-scope-output-svelte5.json | 2 +- 474 files changed, 83788 insertions(+), 788 deletions(-) create mode 100644 tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-no-unused-vars-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-undef-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-unused-expressions-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-no-unused-expressions-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-no-unused-vars-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-no-unused-vars-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-no-unused-vars-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-no-unused-vars-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-input.svelte.js create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-input.svelte.ts create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-type-output.svelte.ts create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json diff --git a/src/parser/globals.ts b/src/parser/globals.ts index 26cc2e2e..8fec55a7 100644 --- a/src/parser/globals.ts +++ b/src/parser/globals.ts @@ -9,7 +9,7 @@ export const globalsForSvelte5 = [ "$state", "$derived", "$effect", - "$effect.pre", + "$effect", "$props", ] as const; export const globals = SVELTE_VERSION.startsWith("5") diff --git a/src/parser/typescript/analyze/index.ts b/src/parser/typescript/analyze/index.ts index d6660547..727726d1 100644 --- a/src/parser/typescript/analyze/index.ts +++ b/src/parser/typescript/analyze/index.ts @@ -250,8 +250,7 @@ function analyzeDollarDollarVariables( } break; } - case "$effect": - case "$effect.pre": { + case "$effect": { if ( scopeManager.globalScope!.through.some( (reference) => reference.identifier.name === svelte5Global, @@ -261,6 +260,10 @@ function analyzeDollarDollarVariables( svelte5Global, "(fn: () => void | (() => void)): void", ); + appendDeclareNamespaceVirtualScript( + svelte5Global, + "export function pre(fn: () => void | (() => void)): void;", + ); } break; } @@ -336,6 +339,32 @@ function analyzeDollarDollarVariables( return true; }); } + + function appendDeclareNamespaceVirtualScript(name: string, script: string) { + ctx.appendVirtualScript(`declare namespace $effect { ${script} }`); + ctx.restoreContext.addRestoreStatementProcess((node, result) => { + if ( + node.type !== "TSModuleDeclaration" || + !node.declare || + node.id?.type !== "Identifier" || + node.id.name !== name + ) { + return false; + } + const program = result.ast; + program.body.splice(program.body.indexOf(node), 1); + + const scopeManager = result.scopeManager as ScopeManager; + + // Remove `declare` variable + removeAllScopeAndVariableAndReference(node, { + visitorKeys: result.visitorKeys, + scopeManager, + }); + + return true; + }); + } } /** diff --git a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json index 2bc42d76..f1529626 100644 --- a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json @@ -61,7 +61,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json index 22f3e21b..76162ab5 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json @@ -61,7 +61,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json index 7fc4ebba..3cc91343 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json @@ -61,7 +61,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json index 1651849e..e5c99d8d 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json @@ -61,7 +61,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-input.svelte new file mode 100644 index 00000000..4abc1593 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-input.svelte @@ -0,0 +1,24 @@ + diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-no-unused-vars-result.json b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-no-unused-vars-result.json new file mode 100644 index 00000000..8ea9fbdb --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-no-unused-vars-result.json @@ -0,0 +1,14 @@ +[ + { + "ruleId": "no-unused-vars", + "code": "remaining", + "line": 4, + "column": 11 + }, + { + "ruleId": "no-unused-vars", + "code": "addTodo", + "line": 9, + "column": 11 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-output.json b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-output.json new file mode 100644 index 00000000..e4e9983f --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-output.json @@ -0,0 +1,4485 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrayExpression", + "elements": [], + "range": [ + 29, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 22, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 14, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 10, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'recalculating'", + "value": "recalculating", + "range": [ + 78, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 66, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "range": [ + 66, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "range": [ + 66, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [ + 66, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [ + 127, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "range": [ + 127, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 126, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 118, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 40 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [ + 105, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 105, + 137 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [ + 138, + 144 + ], + "loc": { + "start": { + "line": 6, + "column": 42 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "range": [ + 105, + 144 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "range": [ + 98, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 49 + } + } + } + ], + "range": [ + 62, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remaining", + "range": [ + 45, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todos", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "range": [ + 36, + 148 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 206, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 189, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [ + 183, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "operator": "!==", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 197, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 183, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [ + 179, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "done", + "range": [ + 221, + 225 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "false", + "value": false, + "range": [ + 235, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 228, + 241 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "range": [ + 221, + 241 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 26 + } + } + } + ], + "range": [ + 217, + 242 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 249, + 253 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 263, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 269, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "range": [ + 263, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 276, + 281 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [ + 263, + 281 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 256, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + "range": [ + 249, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 39 + } + } + } + ], + "range": [ + 245, + 283 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [ + 287, + 292 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "range": [ + 296, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 315, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "done", + "range": [ + 331, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [ + 324, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 27 + } + } + } + ], + "range": [ + 322, + 337 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 319, + 337 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "range": [ + 311, + 337 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "set", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [ + 346, + 350 + ], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "done", + "range": [ + 360, + 364 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 360, + 372 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [ + 360, + 372 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [ + 358, + 374 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 351, + 356 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "range": [ + 350, + 374 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "range": [ + 342, + 374 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 383, + 387 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 399, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "range": [ + 392, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 27 + } + } + } + ], + "range": [ + 390, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 387, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "range": [ + 379, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "set", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "text", + "range": [ + 428, + 432 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 428, + 440 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [ + 428, + 440 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + } + ], + "range": [ + 426, + 442 + ], + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [ + 419, + 424 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "range": [ + 418, + 442 + ], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "range": [ + 410, + 442 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 35 + } + } + } + ], + "range": [ + 306, + 446 + ], + "loc": { + "start": { + "line": 15, + "column": 21 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + ], + "range": [ + 295, + 447 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 287, + 447 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [ + 287, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 452, + 457 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 458, + 464 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "range": [ + 452, + 464 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 465, + 470 + ], + "loc": { + "start": { + "line": 22, + "column": 15 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "range": [ + 452, + 470 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 473, + 475 + ], + "loc": { + "start": { + "line": 22, + "column": 23 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [ + 452, + 475 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [ + 452, + 476 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 26 + } + } + } + ], + "range": [ + 175, + 479 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 23, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "addTodo", + "range": [ + 160, + 167 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 168, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [ + 151, + 479 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 23, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 480, + 489 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "range": [ + 0, + 489 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 24, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "todos", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 36, + 44 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "remaining", + "range": [ + 45, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "todos", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 66, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 74, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "String", + "value": "'recalculating'", + "range": [ + 78, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "todos", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "filter", + "range": [ + 111, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "todo", + "range": [ + 118, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 123, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "!", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": "Identifier", + "value": "todo", + "range": [ + 127, + 131 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 6, + "column": 36 + } + } + }, + { + "type": "Identifier", + "value": "done", + "range": [ + 132, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 6, + "column": 40 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 137, + 138 + ], + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 42 + } + } + }, + { + "type": "Identifier", + "value": "length", + "range": [ + 138, + 144 + ], + "loc": { + "start": { + "line": 6, + "column": 42 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 6, + "column": 48 + }, + "end": { + "line": 6, + "column": 49 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 151, + 159 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "addTodo", + "range": [ + 160, + 167 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 168, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 173, + 174 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 179, + 181 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 183, + 188 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 188, + 189 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "key", + "range": [ + 189, + 192 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "!==", + "range": [ + 193, + 196 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "String", + "value": "'Enter'", + "range": [ + 197, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 27 + }, + "end": { + "line": 10, + "column": 28 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 206, + 212 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 10, + "column": 35 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 217, + 220 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "done", + "range": [ + 221, + 225 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 226, + 227 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 234, + 235 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 235, + 240 + ], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 240, + 241 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 241, + 242 + ], + "loc": { + "start": { + "line": 12, + "column": 26 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 245, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 249, + 253 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 254, + 255 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 263, + 268 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "target", + "range": [ + 269, + 275 + ], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 276, + 281 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 13, + "column": 38 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 282, + 283 + ], + "loc": { + "start": { + "line": 13, + "column": 39 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + { + "type": "Identifier", + "value": "todos", + "range": [ + 287, + 292 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 295, + 296 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "...", + "range": [ + 296, + 299 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "todos", + "range": [ + 299, + 304 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 304, + 305 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 306, + 307 + ], + "loc": { + "start": { + "line": 15, + "column": 21 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "get", + "range": [ + 311, + 314 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "done", + "range": [ + 315, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 319, + 320 + ], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 320, + 321 + ], + "loc": { + "start": { + "line": 16, + "column": 12 + }, + "end": { + "line": 16, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 15 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 324, + 330 + ], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "done", + "range": [ + 331, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 336, + 337 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 337, + 338 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 30 + } + } + }, + { + "type": "Identifier", + "value": "set", + "range": [ + 342, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "done", + "range": [ + 346, + 350 + ], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 350, + 351 + ], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 351, + 356 + ], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 356, + 357 + ], + "loc": { + "start": { + "line": 17, + "column": 17 + }, + "end": { + "line": 17, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 358, + 359 + ], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "done", + "range": [ + 360, + 364 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 365, + 366 + ], + "loc": { + "start": { + "line": 17, + "column": 26 + }, + "end": { + "line": 17, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 367, + 372 + ], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 373, + 374 + ], + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 374, + 375 + ], + "loc": { + "start": { + "line": 17, + "column": 35 + }, + "end": { + "line": 17, + "column": 36 + } + } + }, + { + "type": "Identifier", + "value": "get", + "range": [ + 379, + 382 + ], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 383, + 387 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 387, + 388 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 388, + 389 + ], + "loc": { + "start": { + "line": 18, + "column": 12 + }, + "end": { + "line": 18, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 390, + 391 + ], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 15 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 392, + 398 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 399, + 403 + ], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 404, + 405 + ], + "loc": { + "start": { + "line": 18, + "column": 28 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 405, + 406 + ], + "loc": { + "start": { + "line": 18, + "column": 29 + }, + "end": { + "line": 18, + "column": 30 + } + } + }, + { + "type": "Identifier", + "value": "set", + "range": [ + 410, + 413 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 414, + 418 + ], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 418, + 419 + ], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 419, + 424 + ], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 424, + 425 + ], + "loc": { + "start": { + "line": 19, + "column": 17 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 426, + 427 + ], + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 428, + 432 + ], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 433, + 434 + ], + "loc": { + "start": { + "line": 19, + "column": 26 + }, + "end": { + "line": 19, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 435, + 440 + ], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 441, + 442 + ], + "loc": { + "start": { + "line": 19, + "column": 34 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 445, + 446 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 446, + 447 + ], + "loc": { + "start": { + "line": 20, + "column": 3 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 447, + 448 + ], + "loc": { + "start": { + "line": 20, + "column": 4 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 452, + 457 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 457, + 458 + ], + "loc": { + "start": { + "line": 22, + "column": 7 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "target", + "range": [ + 458, + 464 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 464, + 465 + ], + "loc": { + "start": { + "line": 22, + "column": 14 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 465, + 470 + ], + "loc": { + "start": { + "line": 22, + "column": 15 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 22, + "column": 21 + }, + "end": { + "line": 22, + "column": 22 + } + } + }, + { + "type": "String", + "value": "''", + "range": [ + 473, + 475 + ], + "loc": { + "start": { + "line": 22, + "column": 23 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 475, + 476 + ], + "loc": { + "start": { + "line": 22, + "column": 25 + }, + "end": { + "line": 22, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 478, + 479 + ], + "loc": { + "start": { + "line": 23, + "column": 1 + }, + "end": { + "line": 23, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 482, + 488 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 488, + 489 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 9 + } + } + } + ], + "range": [ + 0, + 490 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json new file mode 100644 index 00000000..0b3a61a3 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json @@ -0,0 +1,122 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 228, + 234 + ], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 256, + 262 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json new file mode 100644 index 00000000..45422c2e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json @@ -0,0 +1,5771 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "todos", + "identifiers": [ + { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrayExpression", + "elements": [], + "range": [29, 31], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [22, 32], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [14, 32], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [287, 292], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [299, 304], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "remaining", + "identifiers": [ + { + "type": "Identifier", + "name": "remaining", + "range": [45, 54], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "remaining", + "range": [45, 54], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'recalculating'", + "value": "recalculating", + "range": [78, 93], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [66, 73], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [74, 77], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "range": [66, 77], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "range": [66, 94], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [66, 95], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [127, 131], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [132, 136], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "range": [127, 136], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "operator": "!", + "prefix": true, + "range": [126, 136], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [118, 136], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 40 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [105, 110], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [111, 117], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [105, 117], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "optional": false, + "range": [105, 137], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [138, 144], + "loc": { + "start": { + "line": 6, + "column": 42 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "range": [105, 144], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "range": [98, 145], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 49 + } + } + } + ], + "range": [62, 148], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remaining", + "range": [45, 54], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todos", + "range": [55, 60], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "range": [36, 148], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [] + }, + { + "name": "addTodo", + "identifiers": [ + { + "type": "Identifier", + "name": "addTodo", + "range": [160, 167], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "addTodo", + "range": [160, 167], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [206, 213], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [183, 188], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [189, 192], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [183, 192], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "operator": "!==", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [197, 204], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [183, 204], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [179, 213], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "false", + "value": false, + "range": [235, 240], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "range": [228, 241], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "range": [221, 241], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 26 + } + } + } + ], + "range": [217, 242], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [263, 268], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [269, 275], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "range": [263, 275], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [276, 281], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [263, 281], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "optional": false, + "range": [256, 282], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + "range": [249, 282], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 39 + } + } + } + ], + "range": [245, 283], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [287, 292], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [299, 304], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "range": [296, 304], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [315, 319], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "done", + "range": [331, 335], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [324, 335], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 27 + } + } + } + ], + "range": [322, 337], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [319, 337], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "range": [311, 337], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "set", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [346, 350], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "done", + "range": [360, 364], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [367, 372], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [360, 372], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [360, 372], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [358, 374], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "range": [350, 374], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "range": [342, 374], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [383, 387], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "text", + "range": [399, 403], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "range": [392, 403], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 27 + } + } + } + ], + "range": [390, 405], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [387, 405], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "range": [379, 405], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "set", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [414, 418], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "text", + "range": [428, 432], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [435, 440], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [428, 440], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [428, 440], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + } + ], + "range": [426, 442], + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "range": [418, 442], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "range": [410, 442], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 35 + } + } + } + ], + "range": [306, 446], + "loc": { + "start": { + "line": 15, + "column": 21 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + ], + "range": [295, 447], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [287, 447], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [287, 448], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [452, 457], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [458, 464], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "range": [452, 464], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [465, 470], + "loc": { + "start": { + "line": 22, + "column": 15 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "range": [452, 470], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [473, 475], + "loc": { + "start": { + "line": 22, + "column": 23 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [452, 475], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [452, 476], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 26 + } + } + } + ], + "range": [175, 479], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 23, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "addTodo", + "range": [160, 167], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [151, 479], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 23, + "column": 2 + } + } + } + } + ], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "todos", + "identifiers": [ + { + "type": "Identifier", + "name": "todos", + "range": [55, 60], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todos", + "range": [55, 60], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'recalculating'", + "value": "recalculating", + "range": [78, 93], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 29 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [66, 73], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [74, 77], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "range": [66, 77], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "optional": false, + "range": [66, 94], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 30 + } + } + }, + "range": [66, 95], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [127, 131], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [132, 136], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "range": [127, 136], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "operator": "!", + "prefix": true, + "range": [126, 136], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [118, 136], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 40 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todos", + "range": [105, 110], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "filter", + "range": [111, 117], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "range": [105, 117], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + "optional": false, + "range": [105, 137], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 41 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "length", + "range": [138, 144], + "loc": { + "start": { + "line": 6, + "column": 42 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "range": [105, 144], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 48 + } + } + }, + "range": [98, 145], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 49 + } + } + } + ], + "range": [62, 148], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "remaining", + "range": [45, 54], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "todos", + "range": [55, 60], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "range": [36, 148], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [105, 110], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [55, 60], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [66, 73], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [105, 110], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [55, 60], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "todo", + "identifiers": [ + { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "node": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UnaryExpression", + "argument": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "todo", + "range": [127, 131], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "done", + "range": [132, 136], + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "range": [127, 136], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "operator": "!", + "prefix": true, + "range": [126, 136], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [118, 136], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 40 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [127, 131], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "todo", + "range": [127, 131], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todo", + "range": [118, 122], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [66, 73], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [206, 213], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [183, 188], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [189, 192], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [183, 192], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "operator": "!==", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [197, 204], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [183, 204], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + "range": [179, 213], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "false", + "value": false, + "range": [235, 240], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "range": [228, 241], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "range": [221, 241], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 26 + } + } + } + ], + "range": [217, 242], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [263, 268], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [269, 275], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "range": [263, 275], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [276, 281], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [263, 281], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "optional": false, + "range": [256, 282], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + "range": [249, 282], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 39 + } + } + } + ], + "range": [245, 283], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "todos", + "range": [287, 292], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "todos", + "range": [299, 304], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "range": [296, 304], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [315, 319], + "loc": { + "start": { + "line": 16, + "column": 7 + }, + "end": { + "line": 16, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "done", + "range": [331, 335], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "range": [324, 335], + "loc": { + "start": { + "line": 16, + "column": 16 + }, + "end": { + "line": 16, + "column": 27 + } + } + } + ], + "range": [322, 337], + "loc": { + "start": { + "line": 16, + "column": 14 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [319, 337], + "loc": { + "start": { + "line": 16, + "column": 11 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + "range": [311, 337], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "set", + "computed": false, + "key": { + "type": "Identifier", + "name": "done", + "range": [346, 350], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "done", + "range": [360, 364], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [367, 372], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [360, 372], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [360, 372], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [358, 374], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "range": [350, 374], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "range": [342, 374], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [383, 387], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "text", + "range": [399, 403], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "range": [392, 403], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 27 + } + } + } + ], + "range": [390, 405], + "loc": { + "start": { + "line": 18, + "column": 14 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [387, 405], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + "range": [379, 405], + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + { + "type": "Property", + "kind": "set", + "computed": false, + "key": { + "type": "Identifier", + "name": "text", + "range": [414, 418], + "loc": { + "start": { + "line": 19, + "column": 7 + }, + "end": { + "line": 19, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "text", + "range": [428, 432], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [435, 440], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [428, 440], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [428, 440], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + } + ], + "range": [426, 442], + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "range": [418, 442], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "range": [410, 442], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 35 + } + } + } + ], + "range": [306, 446], + "loc": { + "start": { + "line": 15, + "column": 21 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + ], + "range": [295, 447], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [287, 447], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 20, + "column": 4 + } + } + }, + "range": [287, 448], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 20, + "column": 5 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [452, 457], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [458, 464], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "range": [452, 464], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 14 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [465, 470], + "loc": { + "start": { + "line": 22, + "column": 15 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "range": [452, 470], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 20 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [473, 475], + "loc": { + "start": { + "line": 22, + "column": 23 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [452, 475], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 25 + } + } + }, + "range": [452, 476], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 26 + } + } + } + ], + "range": [175, 479], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 23, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "addTodo", + "range": [160, 167], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + ], + "range": [151, 479], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 23, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [183, 188], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [263, 268], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [452, 457], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + } + ] + }, + { + "name": "done", + "identifiers": [ + { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "false", + "value": false, + "range": [235, 240], + "loc": { + "start": { + "line": 12, + "column": 20 + }, + "end": { + "line": 12, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "optional": false, + "range": [228, 241], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + "range": [221, 241], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [331, 335], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [360, 364], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + } + ] + }, + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [263, 268], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [269, 275], + "loc": { + "start": { + "line": 13, + "column": 26 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "range": [263, 275], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [276, 281], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 38 + } + } + }, + "range": [263, 281], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 38 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "optional": false, + "range": [256, 282], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 39 + } + } + }, + "range": [249, 282], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 39 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [399, 403], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [428, 432], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [183, 188], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [263, 268], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [287, 292], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [299, 304], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [452, 457], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [168, 173], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [331, 335], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [331, 335], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "done", + "range": [360, 364], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [367, 372], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [360, 372], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "range": [360, 372], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 33 + } + } + } + ], + "range": [358, 374], + "loc": { + "start": { + "line": 17, + "column": 19 + }, + "end": { + "line": 17, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + ], + "range": [350, 374], + "loc": { + "start": { + "line": 17, + "column": 11 + }, + "end": { + "line": 17, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [367, 372], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [360, 364], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [367, 372], + "loc": { + "start": { + "line": 17, + "column": 28 + }, + "end": { + "line": 17, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [351, 356], + "loc": { + "start": { + "line": 17, + "column": 12 + }, + "end": { + "line": 17, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "done", + "range": [360, 364], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "done", + "range": [221, 225], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [399, 403], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [399, 403], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "value", + "identifiers": [ + { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "node": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "text", + "range": [428, 432], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "operator": "=", + "right": { + "type": "Identifier", + "name": "value", + "range": [435, 440], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [428, 440], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "range": [428, 440], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 33 + } + } + } + ], + "range": [426, 442], + "loc": { + "start": { + "line": 19, + "column": 19 + }, + "end": { + "line": 19, + "column": 35 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [ + { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + ], + "range": [418, 442], + "loc": { + "start": { + "line": 19, + "column": 11 + }, + "end": { + "line": 19, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [435, 440], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [428, 432], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "value", + "range": [435, 440], + "loc": { + "start": { + "line": 19, + "column": 28 + }, + "end": { + "line": 19, + "column": 33 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "value", + "range": [419, 424], + "loc": { + "start": { + "line": 19, + "column": 12 + }, + "end": { + "line": 19, + "column": 17 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [428, 432], + "loc": { + "start": { + "line": 19, + "column": 21 + }, + "end": { + "line": 19, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [249, 253], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [287, 292], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "todos", + "range": [299, 304], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "todos", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [66, 73], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [228, 234], + "loc": { + "start": { + "line": 12, + "column": 13 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [256, 262], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [66, 73], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-input.svelte new file mode 100644 index 00000000..640616dc --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-input.svelte @@ -0,0 +1,12 @@ + diff --git a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-output.json b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-output.json new file mode 100644 index 00000000..b4fd89ac --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-output.json @@ -0,0 +1,1779 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "ImportDeclaration", + "source": { + "type": "Literal", + "raw": "'svelte'", + "value": "svelte", + "range": [ + 34, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "range": [ + 10, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 50, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + ], + "range": [ + 46, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "range": [ + 158, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "optional": false, + "range": [ + 158, + 172 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "range": [ + 158, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Identifier", + "name": "b", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 196, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 29 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "untrack", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "optional": false, + "range": [ + 188, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 30 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 184, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "range": [ + 176, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + "optional": false, + "range": [ + 176, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + "range": [ + 176, + 206 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 32 + } + } + } + ], + "range": [ + 87, + 209 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 81, + 209 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 11, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$effect", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 73, + 210 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "range": [ + 73, + 211 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 11, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 212, + 221 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + "range": [ + 0, + 221 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [ + { + "type": "Line", + "value": " this will run when `a` changes,", + "range": [ + 91, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 36 + } + } + }, + { + "type": "Line", + "value": " but not when `b` changes", + "range": [ + 128, + 155 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 29 + } + } + } + ], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "import", + "range": [ + 10, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "from", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "String", + "value": "'svelte'", + "range": [ + 34, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 166, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 169, + 170 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 183, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 184, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "untrack", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 196, + 197 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 197, + 198 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 199, + 201 + ], + "loc": { + "start": { + "line": 10, + "column": 25 + }, + "end": { + "line": 10, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 203, + 204 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 214, + 220 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 220, + 221 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + } + ], + "range": [ + 0, + 222 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 13, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-prefer-const-result.json new file mode 100644 index 00000000..d77a6435 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-prefer-const-result.json @@ -0,0 +1,14 @@ +[ + { + "ruleId": "prefer-const", + "code": "a", + "line": 4, + "column": 8 + }, + { + "ruleId": "prefer-const", + "code": "b", + "line": 4, + "column": 11 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json new file mode 100644 index 00000000..9612496d --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json @@ -0,0 +1,100 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output.json new file mode 100644 index 00000000..7b0c1e2a --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output.json @@ -0,0 +1,1537 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "untrack", + "identifiers": [ + { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "untrack", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 50, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + "range": [ + 50, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 24 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "untrack", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 170, + 171 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "untrack", + "range": [ + 188, + 195 + ], + "loc": { + "start": { + "line": 10, + "column": 14 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 10, + "column": 28 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 73, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 158, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-input.svelte new file mode 100644 index 00000000..95b24f75 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-input.svelte @@ -0,0 +1,14 @@ + + + diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-output.json new file mode 100644 index 00000000..27c7282c --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-output.json @@ -0,0 +1,2336 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 15, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + ], + "range": [ + 11, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 57, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 48, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 33 + } + } + }, + "range": [ + 39, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + ], + "range": [ + 35, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'Too high!'", + "value": "Too high!", + "range": [ + 115, + 126 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 20 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 109, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + "range": [ + 109, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 22 + } + } + } + ], + "range": [ + 104, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "operator": ">", + "right": { + "type": "Literal", + "raw": "10", + "value": 10, + "range": [ + 100, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 92, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 88, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + } + } + } + ], + "range": [ + 84, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 78, + 135 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 9, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 70, + 136 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + "range": [ + 70, + 137 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 9, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 138, + 147 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "range": [ + 0, + 147 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 147, + 149 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 150, + 156 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 157, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 173, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 167, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + "range": [ + 157, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 32 + } + } + } + ], + "selfClosing": false, + "range": [ + 149, + 182 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 182, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 33 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "range": [ + 184, + 191 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "SvelteText", + "value": " / ", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "double", + "range": [ + 195, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "range": [ + 194, + 202 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 14, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 203, + 212 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "range": [ + 149, + 212 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 11, + 14 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 35, + 38 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 4, + "column": 12 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "*", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 29 + }, + "end": { + "line": 4, + "column": 30 + } + } + }, + { + "type": "Numeric", + "value": "2", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 67, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 81, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 88, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Numeric", + "value": "10", + "range": [ + 100, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "String", + "value": "'Too high!'", + "range": [ + 115, + 126 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 7, + "column": 20 + }, + "end": { + "line": 7, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 7, + "column": 21 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 9, + "column": 3 + }, + "end": { + "line": 9, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 138, + 139 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 139, + 140 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 140, + 146 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 147, + 149 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 150, + 156 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 157, + 159 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 160, + 165 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 168, + 169 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 170, + 172 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 178, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 31 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 181, + 182 + ], + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 182, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 33 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 190, + 191 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 191, + 192 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "/", + "range": [ + 192, + 193 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 194, + 195 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 195, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 14, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 203, + 204 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 205, + 211 + ], + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 211, + 212 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + } + ], + "range": [ + 0, + 213 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-prefer-const-result.json new file mode 100644 index 00000000..9e7cd050 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "double", + "line": 4, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json new file mode 100644 index 00000000..8a16c2a5 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json @@ -0,0 +1,124 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output.json new file mode 100644 index 00000000..cf2097bb --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output.json @@ -0,0 +1,1372 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "range": [ + 15, + 32 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ] + }, + { + "name": "double", + "identifiers": [ + { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + "range": [ + 57, + 66 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 48, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 33 + } + } + }, + "range": [ + 39, + 67 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 195, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 57, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 185, + 190 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 195, + 201 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 92, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 173, + 178 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 15, + 20 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 23, + 29 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "alert", + "range": [ + 109, + 114 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-input.svelte new file mode 100644 index 00000000..21de10ae --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-input.svelte @@ -0,0 +1,13 @@ + + + + +

{a} + {b} = {sum}

diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-output.json new file mode 100644 index 00000000..d6cffa0d --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-output.json @@ -0,0 +1,3189 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 18, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 18, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [ + 14, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + ], + "range": [ + 10, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 38, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [ + 34, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + ], + "range": [ + 30, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "sum", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "add", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 60, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "range": [ + 54, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 26 + } + } + } + ], + "range": [ + 50, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "a", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "b", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "range": [ + 98, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + ], + "range": [ + 94, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 88, + 91 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "params": [], + "range": [ + 79, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 115, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "range": [ + 0, + 124 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 124, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 11, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 127, + 133 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 134, + 142 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "a", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 150, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 144, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + "range": [ + 134, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 28 + } + } + } + ], + "selfClosing": false, + "range": [ + 126, + 155 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "a++", + "range": [ + 155, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 32 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 158, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 41 + } + } + }, + "range": [ + 126, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 41 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 169, + 175 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 179, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 176, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "b", + "range": [ + 192, + 193 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 192, + 195 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 186, + 195 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + "range": [ + 176, + 196 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 28 + } + } + } + ], + "selfClosing": false, + "range": [ + 168, + 197 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "b++", + "range": [ + 197, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 32 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 200, + 209 + ], + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 41 + } + } + }, + "range": [ + 168, + 209 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 41 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 12, + "column": 41 + }, + "end": { + "line": 13, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 211, + 212 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 210, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "a", + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + "range": [ + 213, + 216 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + { + "type": "SvelteText", + "value": " + ", + "range": [ + 216, + 219 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "b", + "range": [ + 220, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "range": [ + 219, + 222 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": " = ", + "range": [ + 222, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "sum", + "range": [ + 226, + 229 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "range": [ + 225, + 230 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 20 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 230, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 24 + } + } + }, + "range": [ + 210, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 18, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 30, + 33 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 3, + "column": 15 + }, + "end": { + "line": 3, + "column": 16 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 50, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "sum", + "range": [ + 54, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "add", + "range": [ + 69, + 72 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 24 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 74, + 75 + ], + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 79, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "add", + "range": [ + 88, + 91 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 14 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 98, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 107, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 7, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 7, + "column": 14 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 117, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 124, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 11, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 127, + 133 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 134, + 136 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 11, + "column": 16 + }, + "end": { + "line": 11, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 11, + "column": 18 + }, + "end": { + "line": 11, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 145, + 146 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 147, + 149 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 151, + 153 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "a++", + "range": [ + 155, + 158 + ], + "loc": { + "start": { + "line": 11, + "column": 29 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 158, + 159 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 11, + "column": 33 + }, + "end": { + "line": 11, + "column": 34 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 160, + 166 + ], + "loc": { + "start": { + "line": 11, + "column": 34 + }, + "end": { + "line": 11, + "column": 40 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 40 + }, + "end": { + "line": 11, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 168, + 169 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 169, + 175 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 176, + 178 + ], + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 179, + 184 + ], + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 12, + "column": 17 + }, + "end": { + "line": 12, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 12, + "column": 19 + }, + "end": { + "line": 12, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 189, + 191 + ], + "loc": { + "start": { + "line": 12, + "column": 21 + }, + "end": { + "line": 12, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 192, + 193 + ], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 193, + 195 + ], + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 12, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 196, + 197 + ], + "loc": { + "start": { + "line": 12, + "column": 28 + }, + "end": { + "line": 12, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "b++", + "range": [ + 197, + 200 + ], + "loc": { + "start": { + "line": 12, + "column": 29 + }, + "end": { + "line": 12, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 200, + 201 + ], + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 12, + "column": 33 + }, + "end": { + "line": 12, + "column": 34 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 202, + 208 + ], + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 40 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 12, + "column": 40 + }, + "end": { + "line": 12, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 12, + "column": 41 + }, + "end": { + "line": 13, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 211, + 212 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 212, + 213 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 213, + 214 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 214, + 215 + ], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 215, + 216 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 216, + 217 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 13, + "column": 7 + }, + "end": { + "line": 13, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 219, + 220 + ], + "loc": { + "start": { + "line": 13, + "column": 9 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 220, + 221 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 221, + 222 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 222, + 223 + ], + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 223, + 224 + ], + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 224, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 14 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 13, + "column": 15 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "sum", + "range": [ + 226, + 229 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 230, + 231 + ], + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 231, + 232 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 22 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 232, + 233 + ], + "loc": { + "start": { + "line": 13, + "column": 22 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 233, + 234 + ], + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + } + } + } + ], + "range": [ + 0, + 235 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-prefer-const-result.json new file mode 100644 index 00000000..cc694836 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "sum", + "line": 4, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json new file mode 100644 index 00000000..07e4552b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json @@ -0,0 +1,123 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 18, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json new file mode 100644 index 00000000..a2b4223d --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json @@ -0,0 +1,1684 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [18, 24], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [60, 68], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [25, 26], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [18, 24], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "optional": false, + "range": [18, 27], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "range": [14, 27], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [105, 106], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [150, 151], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [214, 215], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [45, 46], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "optional": false, + "range": [38, 47], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + "range": [34, 47], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [109, 110], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [192, 193], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [220, 221], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + }, + { + "name": "sum", + "identifiers": [ + { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "add", + "range": [69, 72], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "optional": false, + "range": [69, 74], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [60, 68], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "optional": false, + "range": [60, 75], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + "range": [54, 75], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [226, 229], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + }, + { + "name": "add", + "identifiers": [ + { + "type": "Identifier", + "name": "add", + "range": [88, 91], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "add", + "range": [88, 91], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "a", + "range": [105, 106], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "Identifier", + "name": "b", + "range": [109, 110], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "range": [105, 110], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "range": [98, 111], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 15 + } + } + } + ], + "range": [94, 114], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [88, 91], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "params": [], + "range": [79, 114], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [69, 72], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [88, 91], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [18, 24], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [60, 68], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [69, 72], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [88, 91], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [214, 215], + "loc": { + "start": { + "line": 13, + "column": 4 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [220, 221], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [226, 229], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [54, 57], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [105, 106], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [109, 110], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [105, 106], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [109, 110], + "loc": { + "start": { + "line": 7, + "column": 13 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [150, 151], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [150, 151], + "loc": { + "start": { + "line": 11, + "column": 24 + }, + "end": { + "line": 11, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [14, 15], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [192, 193], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [192, 193], + "loc": { + "start": { + "line": 12, + "column": 24 + }, + "end": { + "line": 12, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [34, 35], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [18, 24], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [60, 68], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-input.svelte new file mode 100644 index 00000000..84f9c15b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-input.svelte @@ -0,0 +1,15 @@ + + + + +

{a} + {b} = {sum}

diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-output.json new file mode 100644 index 00000000..d4fc55f9 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-output.json @@ -0,0 +1,3574 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "ImportDeclaration", + "source": { + "type": "Literal", + "raw": "'svelte'", + "value": "svelte", + "range": [ + 34, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "range": [ + 10, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 54, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [ + 50, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + ], + "range": [ + 46, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 74, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 70, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 66, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "sum", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "add", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "optional": false, + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 96, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [ + 90, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + ], + "range": [ + 86, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "a", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Identifier", + "name": "b", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 153, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "untrack", + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 145, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 141, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 134, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + ], + "range": [ + 130, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [ + 124, + 127 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "params": [], + "range": [ + 115, + 165 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 166, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + "range": [ + 0, + 175 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 175, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 13, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 178, + 184 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 185, + 193 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "a", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 201, + 204 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + "range": [ + 185, + 205 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 28 + } + } + } + ], + "selfClosing": false, + "range": [ + 177, + 206 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "a++", + "range": [ + 206, + 209 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 32 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 209, + 218 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 41 + } + } + }, + "range": [ + 177, + 218 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 41 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 13, + "column": 41 + }, + "end": { + "line": 14, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 220, + 226 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "b", + "range": [ + 243, + 244 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 243, + 246 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 237, + 246 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + "range": [ + 227, + 247 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 28 + } + } + } + ], + "selfClosing": false, + "range": [ + 219, + 248 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "b++", + "range": [ + 248, + 251 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 32 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 251, + 260 + ], + "loc": { + "start": { + "line": 14, + "column": 32 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + "range": [ + 219, + 260 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 15, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 261, + 264 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "a", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + "range": [ + 264, + 267 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + { + "type": "SvelteText", + "value": " + ", + "range": [ + 267, + 270 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "b", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "range": [ + 270, + 273 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + { + "type": "SvelteText", + "value": " = ", + "range": [ + 273, + 276 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "sum", + "range": [ + 277, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "range": [ + 276, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 20 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 281, + 285 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + "range": [ + 261, + 285 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 24 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "import", + "range": [ + 10, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "untrack", + "range": [ + 19, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 27, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "from", + "range": [ + 29, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "String", + "value": "'svelte'", + "range": [ + 34, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 16 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 4, + "column": 17 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 4, + "column": 18 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 66, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 72, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 82, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 86, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "sum", + "range": [ + 90, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "add", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 115, + 123 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "add", + "range": [ + 124, + 127 + ], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 8, + "column": 13 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 134, + 140 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "untrack", + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 156, + 158 + ], + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 160, + 161 + ], + "loc": { + "start": { + "line": 9, + "column": 28 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 9, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 168, + 174 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 175, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 13, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 178, + 184 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 185, + 187 + ], + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 188, + 193 + ], + "loc": { + "start": { + "line": 13, + "column": 11 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 193, + 194 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 194, + 195 + ], + "loc": { + "start": { + "line": 13, + "column": 17 + }, + "end": { + "line": 13, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 195, + 196 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 196, + 197 + ], + "loc": { + "start": { + "line": 13, + "column": 19 + }, + "end": { + "line": 13, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 198, + 200 + ], + "loc": { + "start": { + "line": 13, + "column": 21 + }, + "end": { + "line": 13, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 201, + 202 + ], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 202, + 204 + ], + "loc": { + "start": { + "line": 13, + "column": 25 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "a++", + "range": [ + 206, + 209 + ], + "loc": { + "start": { + "line": 13, + "column": 29 + }, + "end": { + "line": 13, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 13, + "column": 32 + }, + "end": { + "line": 13, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 13, + "column": 33 + }, + "end": { + "line": 13, + "column": 34 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 211, + 217 + ], + "loc": { + "start": { + "line": 13, + "column": 34 + }, + "end": { + "line": 13, + "column": 40 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 217, + 218 + ], + "loc": { + "start": { + "line": 13, + "column": 40 + }, + "end": { + "line": 13, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 218, + 219 + ], + "loc": { + "start": { + "line": 13, + "column": 41 + }, + "end": { + "line": 14, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 219, + 220 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 220, + 226 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 227, + 229 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 235, + 236 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 237, + 238 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 238, + 239 + ], + "loc": { + "start": { + "line": 14, + "column": 19 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 240, + 242 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 243, + 244 + ], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 244, + 246 + ], + "loc": { + "start": { + "line": 14, + "column": 25 + }, + "end": { + "line": 14, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 14, + "column": 27 + }, + "end": { + "line": 14, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 14, + "column": 28 + }, + "end": { + "line": 14, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "b++", + "range": [ + 248, + 251 + ], + "loc": { + "start": { + "line": 14, + "column": 29 + }, + "end": { + "line": 14, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 14, + "column": 32 + }, + "end": { + "line": 14, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 252, + 253 + ], + "loc": { + "start": { + "line": 14, + "column": 33 + }, + "end": { + "line": 14, + "column": 34 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 253, + 259 + ], + "loc": { + "start": { + "line": 14, + "column": 34 + }, + "end": { + "line": 14, + "column": 40 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 14, + "column": 40 + }, + "end": { + "line": 14, + "column": 41 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 14, + "column": 41 + }, + "end": { + "line": 15, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 261, + 262 + ], + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 262, + 263 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 263, + 264 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 264, + 265 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 15, + "column": 5 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "+", + "range": [ + 268, + 269 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 12 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 273, + 274 + ], + "loc": { + "start": { + "line": 15, + "column": 12 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": "=", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 275, + 276 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 276, + 277 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "sum", + "range": [ + 277, + 280 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 280, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 282, + 283 + ], + "loc": { + "start": { + "line": 15, + "column": 21 + }, + "end": { + "line": 15, + "column": 22 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 283, + 284 + ], + "loc": { + "start": { + "line": 15, + "column": 22 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 284, + 285 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 24 + } + } + } + ], + "range": [ + 0, + 286 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-prefer-const-result.json new file mode 100644 index 00000000..49e55e1e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "sum", + "line": 6, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json new file mode 100644 index 00000000..f8b99298 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json @@ -0,0 +1,123 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 54, + 60 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 96, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json new file mode 100644 index 00000000..786f61c9 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json @@ -0,0 +1,1967 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [54, 60], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [74, 80], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [96, 104], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "untrack", + "identifiers": [ + { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "local": { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "untrack", + "range": [145, 152], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [61, 62], + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [54, 60], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "optional": false, + "range": [54, 63], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + "range": [50, 63], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [141, 142], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [201, 202], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [265, 266], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [81, 82], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [74, 80], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "optional": false, + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [70, 83], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [159, 160], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [243, 244], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [271, 272], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ] + }, + { + "name": "sum", + "identifiers": [ + { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "add", + "range": [105, 108], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "optional": false, + "range": [105, 110], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [96, 104], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "optional": false, + "range": [96, 111], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + "range": [90, 111], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [277, 280], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ] + }, + { + "name": "add", + "identifiers": [ + { + "type": "Identifier", + "name": "add", + "range": [124, 127], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "add", + "range": [124, 127], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "a", + "range": [141, 142], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "operator": "+", + "right": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "Identifier", + "name": "b", + "range": [159, 160], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [153, 160], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "untrack", + "range": [145, 152], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "optional": false, + "range": [145, 161], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [141, 161], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [134, 162], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 30 + } + } + } + ], + "range": [130, 165], + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "add", + "range": [124, 127], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + "params": [], + "range": [115, 165], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [105, 108], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [124, 127], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [54, 60], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [74, 80], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [96, 104], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "add", + "range": [105, 108], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "add", + "range": [124, 127], + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [265, 266], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 5 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [271, 272], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "sum", + "range": [277, 280], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "sum", + "range": [90, 93], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [141, 142], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "untrack", + "range": [145, 152], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [159, 160], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [159, 160], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [141, 142], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "untrack", + "range": [145, 152], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "untrack", + "range": [19, 26], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [159, 160], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [201, 202], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [201, 202], + "loc": { + "start": { + "line": 13, + "column": 24 + }, + "end": { + "line": 13, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [50, 51], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [243, 244], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [243, 244], + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [70, 71], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [54, 60], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [74, 80], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [96, 104], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-input.svelte new file mode 100644 index 00000000..d7db5237 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-input.svelte @@ -0,0 +1,5 @@ + + +{count} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-output.json new file mode 100644 index 00000000..23d91020 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-output.json @@ -0,0 +1,732 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 16, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 16, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "range": [ + 14, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 14, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + ], + "range": [ + 10, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 30 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 40, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 0, + 49 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 49, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 52, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "range": [ + 51, + 58 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 7 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 42, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 49, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 52, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 7 + } + } + } + ], + "range": [ + 0, + 59 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-prefer-const-result.json new file mode 100644 index 00000000..3e0fd283 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "count", + "line": 2, + "column": 8 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json new file mode 100644 index 00000000..224df193 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output.json new file mode 100644 index 00000000..0cde141e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output.json @@ -0,0 +1,585 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "right": { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 16, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "range": [ + 16, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "range": [ + 14, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "optional": false, + "range": [ + 30, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + "range": [ + 14, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 29 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 52, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 52, + 57 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 30, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-input.svelte new file mode 100644 index 00000000..56273b84 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-input.svelte @@ -0,0 +1,7 @@ + + +
+	{JSON.stringify(others)}
+
diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-output.json new file mode 100644 index 00000000..ca05f181 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-output.json @@ -0,0 +1,1387 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "class", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 16, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + ], + "range": [ + 14, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "optional": false, + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "range": [ + 14, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 47 + } + } + } + ], + "range": [ + 10, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 48 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 58, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 0, + 67 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "pre", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "class", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "classname", + "range": [ + 81, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "range": [ + 80, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + ], + "range": [ + 74, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 22 + } + } + } + ], + "selfClosing": false, + "range": [ + 69, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Identifier", + "name": "others", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 23 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "JSON", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "stringify", + "range": [ + 100, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "range": [ + 95, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 95, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + "range": [ + 94, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 119, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + "range": [ + 69, + 125 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "class", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 21, + 22 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "...", + "range": [ + 34, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 35 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 45 + }, + "end": { + "line": 2, + "column": 46 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 47 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 60, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 67, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "pre", + "range": [ + 70, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "class", + "range": [ + 74, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "classname", + "range": [ + 81, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "Identifier", + "value": "JSON", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "stringify", + "range": [ + 100, + 109 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "others", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 116, + 117 + ], + "loc": { + "start": { + "line": 6, + "column": 23 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 25 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 7, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "pre", + "range": [ + 121, + 124 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 6 + } + } + } + ], + "range": [ + 0, + 126 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-prefer-const-result.json new file mode 100644 index 00000000..1413498b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-prefer-const-result.json @@ -0,0 +1,14 @@ +[ + { + "ruleId": "prefer-const", + "code": "classname", + "line": 2, + "column": 15 + }, + { + "ruleId": "prefer-const", + "code": "others", + "line": 2, + "column": 29 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-requirements.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-requirements.json new file mode 100644 index 00000000..ba9b7a52 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-requirements.json @@ -0,0 +1,5 @@ +{ + "test": { + "eslint": ">=8.0.0" + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json new file mode 100644 index 00000000..3fe10353 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output.json new file mode 100644 index 00000000..aeae4efe --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output.json @@ -0,0 +1,947 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "classname", + "identifiers": [ + { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "class", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 16, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + ], + "range": [ + 14, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "optional": false, + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "range": [ + 14, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 47 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "classname", + "range": [ + 81, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ] + }, + { + "name": "others", + "identifiers": [ + { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "class", + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 16, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "range": [ + 34, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + ], + "range": [ + 14, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "optional": false, + "range": [ + 48, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "range": [ + 14, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 47 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "others", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "classname", + "range": [ + 81, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "classname", + "range": [ + 23, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "JSON", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "others", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "others", + "range": [ + 37, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 34 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "JSON", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "JSON", + "range": [ + 95, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-input.svelte new file mode 100644 index 00000000..b80c0f47 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-input.svelte @@ -0,0 +1,48 @@ + + +
+
+ {#each messages as message} +

{message}

+ {/each} +
+ + + + +
diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-undef-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-undef-result.json new file mode 100644 index 00000000..6086a019 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-undef-result.json @@ -0,0 +1,20 @@ +[ + { + "ruleId": "no-undef", + "code": "toggleValue", + "line": 32, + "column": 3 + }, + { + "ruleId": "no-undef", + "code": "toggleValue", + "line": 32, + "column": 18 + }, + { + "ruleId": "no-undef", + "code": "viewport", + "line": 37, + "column": 18 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-unused-expressions-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-unused-expressions-result.json new file mode 100644 index 00000000..06b0d10f --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-no-unused-expressions-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "no-unused-expressions", + "code": "messages;", + "line": 10, + "column": 3 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-output.json new file mode 100644 index 00000000..af1e13d5 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-output.json @@ -0,0 +1,7513 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "ImportDeclaration", + "source": { + "type": "Literal", + "raw": "'svelte'", + "value": "svelte", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "range": [ + 10, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'dark'", + "value": "dark", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 26 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 55, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 47, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + ], + "range": [ + 43, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrayExpression", + "elements": [], + "range": [ + 94, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 87, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 76, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + ], + "range": [ + 72, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "init": null, + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + ], + "range": [ + 101, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "Identifier", + "name": "messages", + "range": [ + 134, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "range": [ + 134, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "Identifier", + "name": "div", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 172, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "offsetHeight", + "range": [ + 176, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "range": [ + 172, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollTop", + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 51 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "range": [ + 191, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "range": [ + 172, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "operator": ">", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollHeight", + "range": [ + 211, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 67 + }, + "end": { + "line": 11, + "column": 79 + } + } + }, + "range": [ + 207, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 79 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 226, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 82 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 207, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 172, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 165, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 152, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 84 + } + } + } + ], + "range": [ + 146, + 229 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 85 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 18 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollHeight", + "range": [ + 298, + 310 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + "range": [ + 294, + 310 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 36 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollTo", + "range": [ + 282, + 290 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "range": [ + 278, + 290 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 278, + 311 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + "range": [ + 278, + 312 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 38 + } + } + } + ], + "range": [ + 272, + 317 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 266, + 317 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 16, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "tick", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 254, + 260 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "then", + "range": [ + 261, + 265 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "range": [ + 254, + 265 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 254, + 318 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "range": [ + 254, + 319 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 16, + "column": 6 + } + } + } + ], + "range": [ + 249, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "test": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "range": [ + 233, + 323 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + } + ], + "range": [ + 130, + 327 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 124, + 327 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 19, + "column": 2 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$effect", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pre", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "range": [ + 112, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 112, + 328 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 19, + "column": 3 + } + } + }, + "range": [ + 112, + 329 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 417, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 22 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "range": [ + 411, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 424, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 411, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 404, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 34 + } + } + } + ], + "range": [ + 398, + 430 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 35 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 439, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "range": [ + 434, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "range": [ + 469, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + { + "type": "Identifier", + "name": "text", + "range": [ + 482, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 32 + } + } + } + ], + "range": [ + 468, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + "range": [ + 457, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + "range": [ + 457, + 488 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 498, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "range": [ + 492, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + "range": [ + 492, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 513, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 492, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 492, + 516 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 27 + } + } + } + ], + "range": [ + 393, + 520 + ], + "loc": { + "start": { + "line": 22, + "column": 29 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 370, + 375 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 376, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "range": [ + 370, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 20 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + "range": [ + 370, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + "range": [ + 366, + 520 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + } + ], + "range": [ + 362, + 523 + ], + "loc": { + "start": { + "line": 21, + "column": 31 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + ], + "range": [ + 332, + 523 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 562, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "range": [ + 548, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "range": [ + 548, + 575 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 29 + } + } + } + ], + "range": [ + 544, + 578 + ], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 33, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + }, + "params": [], + "range": [ + 526, + 578 + ], + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 33, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 579, + 588 + ], + "loc": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 9 + } + } + }, + "range": [ + 0, + 588 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 34, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 588, + 590 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 36, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 591, + 594 + ], + "loc": { + "start": { + "line": 36, + "column": 1 + }, + "end": { + "line": 36, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Class", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "dark", + "range": [ + 601, + 605 + ], + "loc": { + "start": { + "line": 36, + "column": 11 + }, + "end": { + "line": 36, + "column": 15 + } + } + }, + "modifiers": [], + "range": [ + 595, + 605 + ], + "loc": { + "start": { + "line": 36, + "column": 5 + }, + "end": { + "line": 36, + "column": 15 + } + } + }, + "expression": { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "theme", + "range": [ + 607, + 612 + ], + "loc": { + "start": { + "line": 36, + "column": 17 + }, + "end": { + "line": 36, + "column": 22 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'dark'", + "value": "dark", + "range": [ + 617, + 623 + ], + "loc": { + "start": { + "line": 36, + "column": 27 + }, + "end": { + "line": 36, + "column": 33 + } + } + }, + "range": [ + 607, + 623 + ], + "loc": { + "start": { + "line": 36, + "column": 17 + }, + "end": { + "line": 36, + "column": 33 + } + } + }, + "shorthand": false, + "range": [ + 595, + 624 + ], + "loc": { + "start": { + "line": 36, + "column": 5 + }, + "end": { + "line": 36, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 590, + 625 + ], + "loc": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 625, + 627 + ], + "loc": { + "start": { + "line": 36, + "column": 35 + }, + "end": { + "line": 37, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 628, + 631 + ], + "loc": { + "start": { + "line": 37, + "column": 2 + }, + "end": { + "line": 37, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Binding", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "this", + "range": [ + 637, + 641 + ], + "loc": { + "start": { + "line": 37, + "column": 11 + }, + "end": { + "line": 37, + "column": 15 + } + } + }, + "modifiers": [], + "range": [ + 632, + 641 + ], + "loc": { + "start": { + "line": 37, + "column": 6 + }, + "end": { + "line": 37, + "column": 15 + } + } + }, + "expression": { + "type": "Identifier", + "name": "viewport", + "range": [ + 643, + 651 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + "shorthand": false, + "range": [ + 632, + 652 + ], + "loc": { + "start": { + "line": 37, + "column": 6 + }, + "end": { + "line": 37, + "column": 26 + } + } + } + ], + "selfClosing": false, + "range": [ + 627, + 653 + ], + "loc": { + "start": { + "line": 37, + "column": 1 + }, + "end": { + "line": 37, + "column": 27 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\t", + "range": [ + 653, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 27 + }, + "end": { + "line": 38, + "column": 2 + } + } + }, + { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "messages", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 688, + 689 + ], + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 687, + 690 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "message", + "range": [ + 691, + 698 + ], + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "range": [ + 690, + 699 + ], + "loc": { + "start": { + "line": 39, + "column": 6 + }, + "end": { + "line": 39, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 699, + 703 + ], + "loc": { + "start": { + "line": 39, + "column": 15 + }, + "end": { + "line": 39, + "column": 19 + } + } + }, + "range": [ + 687, + 703 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 19 + } + } + } + ], + "else": null, + "range": [ + 656, + 713 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 40, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 713, + 715 + ], + "loc": { + "start": { + "line": 40, + "column": 9 + }, + "end": { + "line": 41, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 715, + 721 + ], + "loc": { + "start": { + "line": 41, + "column": 1 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + "range": [ + 627, + 721 + ], + "loc": { + "start": { + "line": 37, + "column": 1 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n\t", + "range": [ + 721, + 724 + ], + "loc": { + "start": { + "line": 41, + "column": 7 + }, + "end": { + "line": 43, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "input", + "range": [ + 725, + 730 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "keydown", + "range": [ + 734, + 741 + ], + "loc": { + "start": { + "line": 43, + "column": 11 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + "modifiers": [], + "range": [ + 731, + 741 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + "expression": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 743, + 756 + ], + "loc": { + "start": { + "line": 43, + "column": 20 + }, + "end": { + "line": 43, + "column": 33 + } + } + }, + "range": [ + 731, + 757 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 34 + } + } + } + ], + "selfClosing": true, + "range": [ + 724, + 760 + ], + "loc": { + "start": { + "line": 43, + "column": 1 + }, + "end": { + "line": 43, + "column": 37 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 724, + 760 + ], + "loc": { + "start": { + "line": 43, + "column": 1 + }, + "end": { + "line": 43, + "column": 37 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n\t", + "range": [ + 760, + 763 + ], + "loc": { + "start": { + "line": 43, + "column": 37 + }, + "end": { + "line": 45, + "column": 1 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 764, + 770 + ], + "loc": { + "start": { + "line": 45, + "column": 2 + }, + "end": { + "line": 45, + "column": 8 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 774, + 779 + ], + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 17 + } + } + }, + "modifiers": [], + "range": [ + 771, + 779 + ], + "loc": { + "start": { + "line": 45, + "column": 9 + }, + "end": { + "line": 45, + "column": 17 + } + } + }, + "expression": { + "type": "Identifier", + "name": "toggle", + "range": [ + 781, + 787 + ], + "loc": { + "start": { + "line": 45, + "column": 19 + }, + "end": { + "line": 45, + "column": 25 + } + } + }, + "range": [ + 771, + 788 + ], + "loc": { + "start": { + "line": 45, + "column": 9 + }, + "end": { + "line": 45, + "column": 26 + } + } + } + ], + "selfClosing": false, + "range": [ + 763, + 789 + ], + "loc": { + "start": { + "line": 45, + "column": 1 + }, + "end": { + "line": 45, + "column": 27 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t\tToggle dark mode\n\t", + "range": [ + 789, + 810 + ], + "loc": { + "start": { + "line": 45, + "column": 27 + }, + "end": { + "line": 47, + "column": 1 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 810, + 819 + ], + "loc": { + "start": { + "line": 47, + "column": 1 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + "range": [ + 763, + 819 + ], + "loc": { + "start": { + "line": 45, + "column": 1 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 819, + 820 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 48, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 820, + 826 + ], + "loc": { + "start": { + "line": 48, + "column": 0 + }, + "end": { + "line": 48, + "column": 6 + } + } + }, + "range": [ + 590, + 826 + ], + "loc": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 48, + "column": 6 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "import", + "range": [ + 10, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "from", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "String", + "value": "'svelte'", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 43, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 11 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "String", + "value": "'dark'", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 26 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 28 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 72, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 25 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 101, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "pre", + "range": [ + 120, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 127, + 129 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 130, + 131 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 134, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Keyword", + "value": "const", + "range": [ + 146, + 151 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 11, + "column": 19 + }, + "end": { + "line": 11, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "&&", + "range": [ + 169, + 171 + ], + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 172, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 11, + "column": 31 + }, + "end": { + "line": 11, + "column": 32 + } + } + }, + { + "type": "Identifier", + "value": "offsetHeight", + "range": [ + 176, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 194, + 195 + ], + "loc": { + "start": { + "line": 11, + "column": 50 + }, + "end": { + "line": 11, + "column": 51 + } + } + }, + { + "type": "Identifier", + "value": "scrollTop", + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 51 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 11, + "column": 61 + }, + "end": { + "line": 11, + "column": 62 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 210, + 211 + ], + "loc": { + "start": { + "line": 11, + "column": 66 + }, + "end": { + "line": 11, + "column": 67 + } + } + }, + { + "type": "Identifier", + "value": "scrollHeight", + "range": [ + 211, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 67 + }, + "end": { + "line": 11, + "column": 79 + } + } + }, + { + "type": "Punctuator", + "value": "-", + "range": [ + 224, + 225 + ], + "loc": { + "start": { + "line": 11, + "column": 80 + }, + "end": { + "line": 11, + "column": 81 + } + } + }, + { + "type": "Numeric", + "value": "50", + "range": [ + 226, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 82 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 11, + "column": 84 + }, + "end": { + "line": 11, + "column": 85 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 233, + 235 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "autoscroll", + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "tick", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 258, + 259 + ], + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "then", + "range": [ + 261, + 265 + ], + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 267, + 268 + ], + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 269, + 271 + ], + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 14, + "column": 21 + }, + "end": { + "line": 14, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "scrollTo", + "range": [ + 282, + 290 + ], + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 290, + 291 + ], + "loc": { + "start": { + "line": 15, + "column": 16 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 292, + 293 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 297, + 298 + ], + "loc": { + "start": { + "line": 15, + "column": 23 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "scrollHeight", + "range": [ + 298, + 310 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 310, + 311 + ], + "loc": { + "start": { + "line": 15, + "column": 36 + }, + "end": { + "line": 15, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 311, + 312 + ], + "loc": { + "start": { + "line": 15, + "column": 37 + }, + "end": { + "line": 15, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 316, + 317 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 317, + 318 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 318, + 319 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 322, + 323 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 326, + 327 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 327, + 328 + ], + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 328, + 329 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 332, + 340 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 354, + 355 + ], + "loc": { + "start": { + "line": 21, + "column": 23 + }, + "end": { + "line": 21, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 360, + 361 + ], + "loc": { + "start": { + "line": 21, + "column": 29 + }, + "end": { + "line": 21, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 362, + 363 + ], + "loc": { + "start": { + "line": 21, + "column": 31 + }, + "end": { + "line": 21, + "column": 32 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 366, + 368 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 369, + 370 + ], + "loc": { + "start": { + "line": 22, + "column": 5 + }, + "end": { + "line": 22, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 370, + 375 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 375, + 376 + ], + "loc": { + "start": { + "line": 22, + "column": 11 + }, + "end": { + "line": 22, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "key", + "range": [ + 376, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "===", + "range": [ + 380, + 383 + ], + "loc": { + "start": { + "line": 22, + "column": 16 + }, + "end": { + "line": 22, + "column": 19 + } + } + }, + { + "type": "String", + "value": "'Enter'", + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 20 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 391, + 392 + ], + "loc": { + "start": { + "line": 22, + "column": 27 + }, + "end": { + "line": 22, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 393, + 394 + ], + "loc": { + "start": { + "line": 22, + "column": 29 + }, + "end": { + "line": 22, + "column": 30 + } + } + }, + { + "type": "Keyword", + "value": "const", + "range": [ + 398, + 403 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 409, + 410 + ], + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 416, + 417 + ], + "loc": { + "start": { + "line": 23, + "column": 21 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "target", + "range": [ + 417, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 22 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 423, + 424 + ], + "loc": { + "start": { + "line": 23, + "column": 28 + }, + "end": { + "line": 23, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 424, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 429, + 430 + ], + "loc": { + "start": { + "line": 23, + "column": 34 + }, + "end": { + "line": 23, + "column": 35 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 434, + 436 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 437, + 438 + ], + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "!", + "range": [ + 438, + 439 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 439, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 443, + 444 + ], + "loc": { + "start": { + "line": 24, + "column": 12 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 445, + 451 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 451, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 20 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 466, + 467 + ], + "loc": { + "start": { + "line": 26, + "column": 12 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 468, + 469 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "...", + "range": [ + 469, + 472 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 26, + "column": 26 + }, + "end": { + "line": 26, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "text", + "range": [ + 482, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 486, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 32 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 487, + 488 + ], + "loc": { + "start": { + "line": 26, + "column": 33 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + { + "type": "Identifier", + "value": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 497, + 498 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 27, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "target", + "range": [ + 498, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 504, + 505 + ], + "loc": { + "start": { + "line": 27, + "column": 15 + }, + "end": { + "line": 27, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "value", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 27, + "column": 22 + }, + "end": { + "line": 27, + "column": 23 + } + } + }, + { + "type": "String", + "value": "''", + "range": [ + 513, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 515, + 516 + ], + "loc": { + "start": { + "line": 27, + "column": 26 + }, + "end": { + "line": 27, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 519, + 520 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 522, + 523 + ], + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 526, + 534 + ], + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 31, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 541, + 542 + ], + "loc": { + "start": { + "line": 31, + "column": 16 + }, + "end": { + "line": 31, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 542, + 543 + ], + "loc": { + "start": { + "line": 31, + "column": 17 + }, + "end": { + "line": 31, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 544, + 545 + ], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 31, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 560, + 561 + ], + "loc": { + "start": { + "line": 32, + "column": 14 + }, + "end": { + "line": 32, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "!", + "range": [ + 562, + 563 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 574, + 575 + ], + "loc": { + "start": { + "line": 32, + "column": 28 + }, + "end": { + "line": 32, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 577, + 578 + ], + "loc": { + "start": { + "line": 33, + "column": 1 + }, + "end": { + "line": 33, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 579, + 580 + ], + "loc": { + "start": { + "line": 34, + "column": 0 + }, + "end": { + "line": 34, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 34, + "column": 1 + }, + "end": { + "line": 34, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 581, + 587 + ], + "loc": { + "start": { + "line": 34, + "column": 2 + }, + "end": { + "line": 34, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 587, + 588 + ], + "loc": { + "start": { + "line": 34, + "column": 8 + }, + "end": { + "line": 34, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 588, + 590 + ], + "loc": { + "start": { + "line": 34, + "column": 9 + }, + "end": { + "line": 36, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 590, + 591 + ], + "loc": { + "start": { + "line": 36, + "column": 0 + }, + "end": { + "line": 36, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 591, + 594 + ], + "loc": { + "start": { + "line": 36, + "column": 1 + }, + "end": { + "line": 36, + "column": 4 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "class", + "range": [ + 595, + 600 + ], + "loc": { + "start": { + "line": 36, + "column": 5 + }, + "end": { + "line": 36, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 600, + 601 + ], + "loc": { + "start": { + "line": 36, + "column": 10 + }, + "end": { + "line": 36, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "dark", + "range": [ + 601, + 605 + ], + "loc": { + "start": { + "line": 36, + "column": 11 + }, + "end": { + "line": 36, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 605, + 606 + ], + "loc": { + "start": { + "line": 36, + "column": 15 + }, + "end": { + "line": 36, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 606, + 607 + ], + "loc": { + "start": { + "line": 36, + "column": 16 + }, + "end": { + "line": 36, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "theme", + "range": [ + 607, + 612 + ], + "loc": { + "start": { + "line": 36, + "column": 17 + }, + "end": { + "line": 36, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "===", + "range": [ + 613, + 616 + ], + "loc": { + "start": { + "line": 36, + "column": 23 + }, + "end": { + "line": 36, + "column": 26 + } + } + }, + { + "type": "String", + "value": "'dark'", + "range": [ + 617, + 623 + ], + "loc": { + "start": { + "line": 36, + "column": 27 + }, + "end": { + "line": 36, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 623, + 624 + ], + "loc": { + "start": { + "line": 36, + "column": 33 + }, + "end": { + "line": 36, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 624, + 625 + ], + "loc": { + "start": { + "line": 36, + "column": 34 + }, + "end": { + "line": 36, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 625, + 627 + ], + "loc": { + "start": { + "line": 36, + "column": 35 + }, + "end": { + "line": 37, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 627, + 628 + ], + "loc": { + "start": { + "line": 37, + "column": 1 + }, + "end": { + "line": 37, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 628, + 631 + ], + "loc": { + "start": { + "line": 37, + "column": 2 + }, + "end": { + "line": 37, + "column": 5 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "bind", + "range": [ + 632, + 636 + ], + "loc": { + "start": { + "line": 37, + "column": 6 + }, + "end": { + "line": 37, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 636, + 637 + ], + "loc": { + "start": { + "line": 37, + "column": 10 + }, + "end": { + "line": 37, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "this", + "range": [ + 637, + 641 + ], + "loc": { + "start": { + "line": 37, + "column": 11 + }, + "end": { + "line": 37, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 641, + 642 + ], + "loc": { + "start": { + "line": 37, + "column": 15 + }, + "end": { + "line": 37, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 642, + 643 + ], + "loc": { + "start": { + "line": 37, + "column": 16 + }, + "end": { + "line": 37, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "viewport", + "range": [ + 643, + 651 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 651, + 652 + ], + "loc": { + "start": { + "line": 37, + "column": 25 + }, + "end": { + "line": 37, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 652, + 653 + ], + "loc": { + "start": { + "line": 37, + "column": 26 + }, + "end": { + "line": 37, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t\t", + "range": [ + 653, + 656 + ], + "loc": { + "start": { + "line": 37, + "column": 27 + }, + "end": { + "line": 38, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 656, + 657 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 38, + "column": 3 + } + } + }, + { + "type": "MustacheKeyword", + "value": "#each", + "range": [ + 657, + 662 + ], + "loc": { + "start": { + "line": 38, + "column": 3 + }, + "end": { + "line": 38, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 17 + } + } + }, + { + "type": "Keyword", + "value": "as", + "range": [ + 672, + 674 + ], + "loc": { + "start": { + "line": 38, + "column": 18 + }, + "end": { + "line": 38, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 682, + 683 + ], + "loc": { + "start": { + "line": 38, + "column": 28 + }, + "end": { + "line": 38, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 687, + 688 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 4 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 688, + 689 + ], + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 689, + 690 + ], + "loc": { + "start": { + "line": 39, + "column": 5 + }, + "end": { + "line": 39, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 690, + 691 + ], + "loc": { + "start": { + "line": 39, + "column": 6 + }, + "end": { + "line": 39, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "message", + "range": [ + 691, + 698 + ], + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 698, + 699 + ], + "loc": { + "start": { + "line": 39, + "column": 14 + }, + "end": { + "line": 39, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 699, + 700 + ], + "loc": { + "start": { + "line": 39, + "column": 15 + }, + "end": { + "line": 39, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 700, + 701 + ], + "loc": { + "start": { + "line": 39, + "column": 16 + }, + "end": { + "line": 39, + "column": 17 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 701, + 702 + ], + "loc": { + "start": { + "line": 39, + "column": 17 + }, + "end": { + "line": 39, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 702, + 703 + ], + "loc": { + "start": { + "line": 39, + "column": 18 + }, + "end": { + "line": 39, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 706, + 707 + ], + "loc": { + "start": { + "line": 40, + "column": 2 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + { + "type": "MustacheKeyword", + "value": "/each", + "range": [ + 707, + 712 + ], + "loc": { + "start": { + "line": 40, + "column": 3 + }, + "end": { + "line": 40, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 712, + 713 + ], + "loc": { + "start": { + "line": 40, + "column": 8 + }, + "end": { + "line": 40, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 713, + 715 + ], + "loc": { + "start": { + "line": 40, + "column": 9 + }, + "end": { + "line": 41, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 715, + 716 + ], + "loc": { + "start": { + "line": 41, + "column": 1 + }, + "end": { + "line": 41, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 716, + 717 + ], + "loc": { + "start": { + "line": 41, + "column": 2 + }, + "end": { + "line": 41, + "column": 3 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 717, + 720 + ], + "loc": { + "start": { + "line": 41, + "column": 3 + }, + "end": { + "line": 41, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 720, + 721 + ], + "loc": { + "start": { + "line": 41, + "column": 6 + }, + "end": { + "line": 41, + "column": 7 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n\t", + "range": [ + 721, + 724 + ], + "loc": { + "start": { + "line": 41, + "column": 7 + }, + "end": { + "line": 43, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 724, + 725 + ], + "loc": { + "start": { + "line": 43, + "column": 1 + }, + "end": { + "line": 43, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "input", + "range": [ + 725, + 730 + ], + "loc": { + "start": { + "line": 43, + "column": 2 + }, + "end": { + "line": 43, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 731, + 733 + ], + "loc": { + "start": { + "line": 43, + "column": 8 + }, + "end": { + "line": 43, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 733, + 734 + ], + "loc": { + "start": { + "line": 43, + "column": 10 + }, + "end": { + "line": 43, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "keydown", + "range": [ + 734, + 741 + ], + "loc": { + "start": { + "line": 43, + "column": 11 + }, + "end": { + "line": 43, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 741, + 742 + ], + "loc": { + "start": { + "line": 43, + "column": 18 + }, + "end": { + "line": 43, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 742, + 743 + ], + "loc": { + "start": { + "line": 43, + "column": 19 + }, + "end": { + "line": 43, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "handleKeydown", + "range": [ + 743, + 756 + ], + "loc": { + "start": { + "line": 43, + "column": 20 + }, + "end": { + "line": 43, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 756, + 757 + ], + "loc": { + "start": { + "line": 43, + "column": 33 + }, + "end": { + "line": 43, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 758, + 759 + ], + "loc": { + "start": { + "line": 43, + "column": 35 + }, + "end": { + "line": 43, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 759, + 760 + ], + "loc": { + "start": { + "line": 43, + "column": 36 + }, + "end": { + "line": 43, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n\t", + "range": [ + 760, + 763 + ], + "loc": { + "start": { + "line": 43, + "column": 37 + }, + "end": { + "line": 45, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 763, + 764 + ], + "loc": { + "start": { + "line": 45, + "column": 1 + }, + "end": { + "line": 45, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 764, + 770 + ], + "loc": { + "start": { + "line": 45, + "column": 2 + }, + "end": { + "line": 45, + "column": 8 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 771, + 773 + ], + "loc": { + "start": { + "line": 45, + "column": 9 + }, + "end": { + "line": 45, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 773, + 774 + ], + "loc": { + "start": { + "line": 45, + "column": 11 + }, + "end": { + "line": 45, + "column": 12 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 774, + 779 + ], + "loc": { + "start": { + "line": 45, + "column": 12 + }, + "end": { + "line": 45, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 779, + 780 + ], + "loc": { + "start": { + "line": 45, + "column": 17 + }, + "end": { + "line": 45, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 780, + 781 + ], + "loc": { + "start": { + "line": 45, + "column": 18 + }, + "end": { + "line": 45, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "toggle", + "range": [ + 781, + 787 + ], + "loc": { + "start": { + "line": 45, + "column": 19 + }, + "end": { + "line": 45, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 787, + 788 + ], + "loc": { + "start": { + "line": 45, + "column": 25 + }, + "end": { + "line": 45, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 788, + 789 + ], + "loc": { + "start": { + "line": 45, + "column": 26 + }, + "end": { + "line": 45, + "column": 27 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t\t", + "range": [ + 789, + 792 + ], + "loc": { + "start": { + "line": 45, + "column": 27 + }, + "end": { + "line": 46, + "column": 2 + } + } + }, + { + "type": "HTMLText", + "value": "Toggle", + "range": [ + 792, + 798 + ], + "loc": { + "start": { + "line": 46, + "column": 2 + }, + "end": { + "line": 46, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 798, + 799 + ], + "loc": { + "start": { + "line": 46, + "column": 8 + }, + "end": { + "line": 46, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "dark", + "range": [ + 799, + 803 + ], + "loc": { + "start": { + "line": 46, + "column": 9 + }, + "end": { + "line": 46, + "column": 13 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 803, + 804 + ], + "loc": { + "start": { + "line": 46, + "column": 13 + }, + "end": { + "line": 46, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "mode", + "range": [ + 804, + 808 + ], + "loc": { + "start": { + "line": 46, + "column": 14 + }, + "end": { + "line": 46, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 808, + 810 + ], + "loc": { + "start": { + "line": 46, + "column": 18 + }, + "end": { + "line": 47, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 810, + 811 + ], + "loc": { + "start": { + "line": 47, + "column": 1 + }, + "end": { + "line": 47, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 811, + 812 + ], + "loc": { + "start": { + "line": 47, + "column": 2 + }, + "end": { + "line": 47, + "column": 3 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 812, + 818 + ], + "loc": { + "start": { + "line": 47, + "column": 3 + }, + "end": { + "line": 47, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 818, + 819 + ], + "loc": { + "start": { + "line": 47, + "column": 9 + }, + "end": { + "line": 47, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 819, + 820 + ], + "loc": { + "start": { + "line": 47, + "column": 10 + }, + "end": { + "line": 48, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 820, + 821 + ], + "loc": { + "start": { + "line": 48, + "column": 0 + }, + "end": { + "line": 48, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 821, + 822 + ], + "loc": { + "start": { + "line": 48, + "column": 1 + }, + "end": { + "line": 48, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 822, + 825 + ], + "loc": { + "start": { + "line": 48, + "column": 2 + }, + "end": { + "line": 48, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 825, + 826 + ], + "loc": { + "start": { + "line": 48, + "column": 5 + }, + "end": { + "line": 48, + "column": 6 + } + } + } + ], + "range": [ + 0, + 827 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 49, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-prefer-const-result.json new file mode 100644 index 00000000..65a55407 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "theme", + "line": 4, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json new file mode 100644 index 00000000..178925e8 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json @@ -0,0 +1,123 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output.json new file mode 100644 index 00000000..be2b1ddf --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output.json @@ -0,0 +1,6265 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tick", + "identifiers": [ + { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "theme", + "identifiers": [ + { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'dark'", + "value": "dark", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 26 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 55, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 27 + } + } + }, + "range": [ + 47, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 27 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "theme", + "range": [ + 607, + 612 + ], + "loc": { + "start": { + "line": 36, + "column": 17 + }, + "end": { + "line": 36, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + } + ] + }, + { + "name": "messages", + "identifiers": [ + { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrayExpression", + "elements": [], + "range": [ + 94, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 25 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 87, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + "range": [ + 76, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 26 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 134, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "name": "div", + "identifiers": [ + { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "init": null, + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 172, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ] + }, + { + "name": "handleKeydown", + "identifiers": [ + { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 417, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 22 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "range": [ + 411, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 424, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 411, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 404, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 34 + } + } + } + ], + "range": [ + 398, + 430 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 35 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 439, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "range": [ + 434, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "range": [ + 469, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + { + "type": "Identifier", + "name": "text", + "range": [ + 482, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 32 + } + } + } + ], + "range": [ + 468, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + "range": [ + 457, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + "range": [ + 457, + 488 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 498, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "range": [ + 492, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + "range": [ + 492, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 513, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 492, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 492, + 516 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 27 + } + } + } + ], + "range": [ + 393, + 520 + ], + "loc": { + "start": { + "line": 22, + "column": 29 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 370, + 375 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 376, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "range": [ + 370, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 20 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + "range": [ + 370, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + "range": [ + 366, + 520 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + } + ], + "range": [ + 362, + 523 + ], + "loc": { + "start": { + "line": 21, + "column": 31 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + ], + "range": [ + 332, + 523 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 29, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 743, + 756 + ], + "loc": { + "start": { + "line": 43, + "column": 20 + }, + "end": { + "line": 43, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + } + } + ] + }, + { + "name": "toggle", + "identifiers": [ + { + "type": "Identifier", + "name": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "operator": "=", + "right": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 562, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 16 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "range": [ + 548, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "range": [ + 548, + 575 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 29 + } + } + } + ], + "range": [ + 544, + 578 + ], + "loc": { + "start": { + "line": 31, + "column": 19 + }, + "end": { + "line": 33, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + }, + "params": [], + "range": [ + 526, + 578 + ], + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 33, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 781, + 787 + ], + "loc": { + "start": { + "line": 45, + "column": 19 + }, + "end": { + "line": 45, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "theme", + "range": [ + 607, + 612 + ], + "loc": { + "start": { + "line": 36, + "column": 17 + }, + "end": { + "line": 36, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "theme", + "range": [ + 47, + 52 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "viewport", + "range": [ + 643, + 651 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 743, + 756 + ], + "loc": { + "start": { + "line": 43, + "column": 20 + }, + "end": { + "line": 43, + "column": 33 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "toggle", + "range": [ + 781, + 787 + ], + "loc": { + "start": { + "line": 45, + "column": 19 + }, + "end": { + "line": 45, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "toggle", + "range": [ + 535, + 541 + ], + "loc": { + "start": { + "line": 31, + "column": 10 + }, + "end": { + "line": 31, + "column": 16 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "autoscroll", + "identifiers": [ + { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "init": { + "type": "LogicalExpression", + "left": { + "type": "Identifier", + "name": "div", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "operator": "&&", + "right": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 172, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "offsetHeight", + "range": [ + 176, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "range": [ + 172, + 188 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollTop", + "range": [ + 195, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 51 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "range": [ + 191, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "range": [ + 172, + 204 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 60 + } + } + }, + "operator": ">", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollHeight", + "range": [ + 211, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 67 + }, + "end": { + "line": 11, + "column": 79 + } + } + }, + "range": [ + 207, + 223 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 79 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "50", + "value": 50, + "range": [ + 226, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 82 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 207, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 172, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 165, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 84 + } + } + }, + "range": [ + 152, + 228 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 84 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 134, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 172, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 237, + 247 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 16 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "autoscroll", + "range": [ + 152, + 162 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 18 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 134, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 165, + 168 + ], + "loc": { + "start": { + "line": 11, + "column": 21 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 172, + 175 + ], + "loc": { + "start": { + "line": 11, + "column": 28 + }, + "end": { + "line": 11, + "column": 31 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 191, + 194 + ], + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 50 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 207, + 210 + ], + "loc": { + "start": { + "line": 11, + "column": 63 + }, + "end": { + "line": 11, + "column": 66 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 254, + 258 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 15, + "column": 4 + }, + "end": { + "line": 15, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 294, + 297 + ], + "loc": { + "start": { + "line": 15, + "column": 20 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 105, + 108 + ], + "loc": { + "start": { + "line": 7, + "column": 5 + }, + "end": { + "line": 7, + "column": 8 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "event", + "identifiers": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 417, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 22 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "range": [ + 411, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 424, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 411, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 404, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 34 + } + } + } + ], + "range": [ + 398, + 430 + ], + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 35 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 445, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "text", + "range": [ + 439, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 438, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 7 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "range": [ + 434, + 452 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "operator": "=", + "right": { + "type": "ArrayExpression", + "elements": [ + { + "type": "SpreadElement", + "argument": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "range": [ + 469, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + { + "type": "Identifier", + "name": "text", + "range": [ + 482, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 32 + } + } + } + ], + "range": [ + 468, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + "range": [ + 457, + 487 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 33 + } + } + }, + "range": [ + 457, + 488 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 498, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 9 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "range": [ + 492, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 15 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 505, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 16 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + "range": [ + 492, + 510 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 21 + } + } + }, + "operator": "=", + "right": { + "type": "Literal", + "raw": "''", + "value": "", + "range": [ + 513, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 24 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 492, + 515 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 26 + } + } + }, + "range": [ + 492, + 516 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 27 + } + } + } + ], + "range": [ + 393, + 520 + ], + "loc": { + "start": { + "line": 22, + "column": 29 + }, + "end": { + "line": 28, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 370, + 375 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "key", + "range": [ + 376, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 12 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "range": [ + 370, + 379 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 15 + } + } + }, + "operator": "===", + "right": { + "type": "Literal", + "raw": "'Enter'", + "value": "Enter", + "range": [ + 384, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 20 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + "range": [ + 370, + 391 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 27 + } + } + }, + "range": [ + 366, + 520 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 28, + "column": 3 + } + } + } + ], + "range": [ + 362, + 523 + ], + "loc": { + "start": { + "line": 21, + "column": 31 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "handleKeydown", + "range": [ + 341, + 354 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 23 + } + } + }, + "params": [ + { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + ], + "range": [ + 332, + 523 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 29, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 370, + 375 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 370, + 375 + ], + "loc": { + "start": { + "line": 22, + "column": 6 + }, + "end": { + "line": 22, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [ + { + "name": "text", + "identifiers": [ + { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "init": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "target", + "range": [ + 417, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 22 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "range": [ + 411, + 423 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "value", + "range": [ + 424, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 29 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 411, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 34 + } + } + }, + "range": [ + 404, + 429 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 34 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 439, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 482, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 32 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + }, + "from": "block", + "init": true, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 439, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "text", + "range": [ + 482, + 486 + ], + "loc": { + "start": { + "line": 26, + "column": 28 + }, + "end": { + "line": 26, + "column": 32 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "text", + "range": [ + 404, + 408 + ], + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 411, + 416 + ], + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 21 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "event", + "range": [ + 492, + 497 + ], + "loc": { + "start": { + "line": 27, + "column": 3 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "event", + "range": [ + 355, + 360 + ], + "loc": { + "start": { + "line": 21, + "column": 24 + }, + "end": { + "line": 21, + "column": 29 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 11 + } + } + }, + "from": "block", + "init": false, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 472, + 480 + ], + "loc": { + "start": { + "line": 26, + "column": 18 + }, + "end": { + "line": 26, + "column": 26 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 76, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "message", + "identifiers": [ + { + "type": "Identifier", + "name": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "messages", + "range": [ + 663, + 671 + ], + "loc": { + "start": { + "line": 38, + "column": 9 + }, + "end": { + "line": 38, + "column": 17 + } + } + }, + "context": { + "type": "Identifier", + "name": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 688, + 689 + ], + "loc": { + "start": { + "line": 39, + "column": 4 + }, + "end": { + "line": 39, + "column": 5 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 687, + 690 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 6 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "message", + "range": [ + 691, + 698 + ], + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "range": [ + 690, + 699 + ], + "loc": { + "start": { + "line": 39, + "column": 6 + }, + "end": { + "line": 39, + "column": 15 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 699, + 703 + ], + "loc": { + "start": { + "line": 39, + "column": 15 + }, + "end": { + "line": 39, + "column": 19 + } + } + }, + "range": [ + 687, + 703 + ], + "loc": { + "start": { + "line": 39, + "column": 3 + }, + "end": { + "line": 39, + "column": 19 + } + } + } + ], + "else": null, + "range": [ + 656, + 713 + ], + "loc": { + "start": { + "line": 38, + "column": 2 + }, + "end": { + "line": 40, + "column": 9 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 691, + 698 + ], + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 691, + 698 + ], + "loc": { + "start": { + "line": 39, + "column": 7 + }, + "end": { + "line": 39, + "column": 14 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "range": [ + 675, + 682 + ], + "loc": { + "start": { + "line": 38, + "column": 21 + }, + "end": { + "line": 38, + "column": 28 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 112, + 119 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "viewport", + "range": [ + 643, + 651 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 548, + 559 + ], + "loc": { + "start": { + "line": 32, + "column": 2 + }, + "end": { + "line": 32, + "column": 13 + } + } + }, + "from": "function", + "init": false, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "toggleValue", + "range": [ + 563, + 574 + ], + "loc": { + "start": { + "line": 32, + "column": 17 + }, + "end": { + "line": 32, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "viewport", + "range": [ + 643, + 651 + ], + "loc": { + "start": { + "line": 37, + "column": 17 + }, + "end": { + "line": 37, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-input.svelte new file mode 100644 index 00000000..0b5ebf4a --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-input.svelte @@ -0,0 +1,7 @@ + + + diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-output.json new file mode 100644 index 00000000..cfba0680 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-output.json @@ -0,0 +1,1224 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 22, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 14, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 10, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 0, + 42 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 42, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 45, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 52, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 68, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 62, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + "range": [ + 52, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 32 + } + } + } + ], + "selfClosing": false, + "range": [ + 44, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\tclicks: ", + "range": [ + 77, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "range": [ + 87, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 7, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 95, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "range": [ + 44, + 104 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 34, + 35 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 35, + 41 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 42, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 5, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 44, + 45 + ], + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 45, + 51 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 52, + 54 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 65, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 68, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 73, + 75 + ], + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 31 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 32 + }, + "end": { + "line": 5, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 77, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "clicks:", + "range": [ + 79, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 87, + 88 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 88, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 6, + "column": 15 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 7, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 97, + 103 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + } + ], + "range": [ + 0, + 105 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 8, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json new file mode 100644 index 00000000..d35c8eda --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json new file mode 100644 index 00000000..39acdf1a --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json @@ -0,0 +1,489 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [29, 30], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [22, 31], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [14, 31], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [68, 73], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [88, 93], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [88, 93], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [68, 73], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [68, 73], + "loc": { + "start": { + "line": 5, + "column": 24 + }, + "end": { + "line": 5, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-input.svelte new file mode 100644 index 00000000..7935359b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-input.svelte @@ -0,0 +1,10 @@ + + + + +

{count} doubled is {double}

diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-output.json new file mode 100644 index 00000000..b34140e1 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-output.json @@ -0,0 +1,2040 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 22, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 14, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 10, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 56, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 47, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "range": [ + 38, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + ], + "range": [ + 34, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 68, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "range": [ + 0, + 77 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 77, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 80, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 87, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 103, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 97, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + "range": [ + 87, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 32 + } + } + } + ], + "selfClosing": false, + "range": [ + 79, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "double", + "range": [ + 115, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "range": [ + 114, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 8, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 123, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 79, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 132, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 134, + 137 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 138, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "range": [ + 137, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": " doubled is ", + "range": [ + 144, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "double", + "range": [ + 157, + 163 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "range": [ + 156, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 30 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 164, + 168 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + "range": [ + 134, + 168 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 34 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 34, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "*", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Numeric", + "value": "2", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 70, + 76 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 77, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 80, + 86 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 87, + 89 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 89, + 90 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 90, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 100, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 21 + }, + "end": { + "line": 6, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 103, + 108 + ], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 108, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 112, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 115, + 121 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 8, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 125, + 131 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 132, + 134 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 135, + 136 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 136, + 137 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 137, + 138 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 138, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 144, + 145 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 145, + 152 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 152, + 153 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 153, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 157, + 163 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 29 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 166, + 167 + ], + "loc": { + "start": { + "line": 10, + "column": 32 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 10, + "column": 33 + }, + "end": { + "line": 10, + "column": 34 + } + } + } + ], + "range": [ + 0, + 169 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-prefer-const-result.json new file mode 100644 index 00000000..ce8533a2 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "double", + "line": 3, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json new file mode 100644 index 00000000..5170ff17 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json @@ -0,0 +1,100 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json new file mode 100644 index 00000000..38a14c03 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json @@ -0,0 +1,971 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [47, 55], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [29, 30], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [22, 31], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [14, 31], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [56, 61], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [103, 108], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [138, 143], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "double", + "identifiers": [ + { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [56, 61], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [64, 65], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [56, 65], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [47, 55], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "optional": false, + "range": [47, 66], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "range": [38, 66], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [115, 121], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [157, 163], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [47, 55], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [56, 61], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [115, 121], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [138, 143], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [157, 163], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [38, 44], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [103, 108], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [103, 108], + "loc": { + "start": { + "line": 6, + "column": 24 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [47, 55], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-input.svelte new file mode 100644 index 00000000..5a2b2931 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-input.svelte @@ -0,0 +1,24 @@ + + + + +

{count} doubled is {double}

diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-output.json new file mode 100644 index 00000000..73770948 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-output.json @@ -0,0 +1,3251 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 22, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 14, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 10, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 56, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 47, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "range": [ + 38, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + ], + "range": [ + 34, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "count", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "double", + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "double", + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + } + ], + "range": [ + 229, + 246 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 31 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "range": [ + 217, + 228 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + "optional": false, + "range": [ + 217, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "range": [ + 217, + 248 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "'cleanup'", + "value": "cleanup", + "range": [ + 415, + 424 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 24 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 411, + 414 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "range": [ + 403, + 414 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 403, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + "range": [ + 403, + 426 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 26 + } + } + } + ], + "range": [ + 265, + 430 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 16, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 259, + 430 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 16, + "column": 3 + } + } + }, + "range": [ + 252, + 431 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 16, + "column": 4 + } + } + } + ], + "range": [ + 84, + 434 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 78, + 434 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 17, + "column": 2 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "optional": false, + "range": [ + 70, + 435 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "range": [ + 70, + 436 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 17, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 437, + 446 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "range": [ + 0, + 446 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 446, + 448 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 449, + 455 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 459, + 464 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 456, + 464 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 472, + 477 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 472, + 479 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 31 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 466, + 479 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 31 + } + } + }, + "range": [ + 456, + 480 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 32 + } + } + } + ], + "selfClosing": false, + "range": [ + 448, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 481, + 483 + ], + "loc": { + "start": { + "line": 20, + "column": 33 + }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "double", + "range": [ + 484, + 490 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "range": [ + 483, + 491 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 22, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 492, + 501 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + "range": [ + 448, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 501, + 503 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 504, + 505 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 503, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "range": [ + 506, + 513 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": " doubled is ", + "range": [ + 513, + 525 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "double", + "range": [ + 526, + 532 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "range": [ + 525, + 533 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 30 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 533, + 537 + ], + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + "range": [ + 503, + 537 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 34 + } + } + } + ], + "sourceType": "module", + "comments": [ + { + "type": "Line", + "value": " runs when the component is mounted, and again", + "range": [ + 88, + 136 + ], + "loc": { + "start": { + "line": 6, + "column": 2 + }, + "end": { + "line": 6, + "column": 50 + } + } + }, + { + "type": "Line", + "value": " whenever `count` or `double` change,", + "range": [ + 139, + 178 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 41 + } + } + }, + { + "type": "Line", + "value": " after the DOM has been updated", + "range": [ + 181, + 214 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + { + "type": "Line", + "value": " if a callback is provided, it will run", + "range": [ + 270, + 311 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 44 + } + } + }, + { + "type": "Line", + "value": " a) immediately before the effect re-runs", + "range": [ + 315, + 358 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 13, + "column": 46 + } + } + }, + { + "type": "Line", + "value": " b) when the component is destroyed", + "range": [ + 362, + 399 + ], + "loc": { + "start": { + "line": 14, + "column": 3 + }, + "end": { + "line": 14, + "column": 40 + } + } + } + ], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 34, + 37 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "*", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 29 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Numeric", + "value": "2", + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 32 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 81, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 224, + 225 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 225, + 228 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 228, + 229 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 9, + "column": 21 + }, + "end": { + "line": 9, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 245, + 246 + ], + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 246, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 31 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 9, + "column": 32 + }, + "end": { + "line": 9, + "column": 33 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 252, + 258 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 11, + "column": 9 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 260, + 261 + ], + "loc": { + "start": { + "line": 11, + "column": 10 + }, + "end": { + "line": 11, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 262, + 264 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 410, + 411 + ], + "loc": { + "start": { + "line": 15, + "column": 10 + }, + "end": { + "line": 15, + "column": 11 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 411, + 414 + ], + "loc": { + "start": { + "line": 15, + "column": 11 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 414, + 415 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 15 + } + } + }, + { + "type": "String", + "value": "'cleanup'", + "range": [ + 415, + 424 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 424, + 425 + ], + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 425, + 426 + ], + "loc": { + "start": { + "line": 15, + "column": 25 + }, + "end": { + "line": 15, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 429, + 430 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 430, + 431 + ], + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 433, + 434 + ], + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 434, + 435 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 435, + 436 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 437, + 438 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 438, + 439 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 439, + 445 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 445, + 446 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 446, + 448 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 448, + 449 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 449, + 455 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 456, + 458 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 458, + 459 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 459, + 464 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 464, + 465 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 465, + 466 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 466, + 467 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 467, + 468 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 469, + 471 + ], + "loc": { + "start": { + "line": 20, + "column": 21 + }, + "end": { + "line": 20, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 472, + 477 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "++", + "range": [ + 477, + 479 + ], + "loc": { + "start": { + "line": 20, + "column": 29 + }, + "end": { + "line": 20, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 479, + 480 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 20, + "column": 32 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 481, + 483 + ], + "loc": { + "start": { + "line": 20, + "column": 33 + }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 483, + 484 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 484, + 490 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 490, + 491 + ], + "loc": { + "start": { + "line": 21, + "column": 8 + }, + "end": { + "line": 21, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 21, + "column": 9 + }, + "end": { + "line": 22, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 492, + 493 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 493, + 494 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 494, + 500 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 500, + 501 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 501, + 503 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 503, + 504 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 504, + 505 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 505, + 506 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 512, + 513 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 513, + 514 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 514, + 521 + ], + "loc": { + "start": { + "line": 24, + "column": 11 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 521, + 522 + ], + "loc": { + "start": { + "line": 24, + "column": 18 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 522, + 524 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 524, + 525 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 525, + 526 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "double", + "range": [ + 526, + 532 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 532, + 533 + ], + "loc": { + "start": { + "line": 24, + "column": 29 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 533, + 534 + ], + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 534, + 535 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 32 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 535, + 536 + ], + "loc": { + "start": { + "line": 24, + "column": 32 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 536, + 537 + ], + "loc": { + "start": { + "line": 24, + "column": 33 + }, + "end": { + "line": 24, + "column": 34 + } + } + } + ], + "range": [ + 0, + 538 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-prefer-const-result.json new file mode 100644 index 00000000..ce8533a2 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "double", + "line": 3, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json new file mode 100644 index 00000000..66211c07 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json @@ -0,0 +1,124 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output.json new file mode 100644 index 00000000..683ea63d --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output.json @@ -0,0 +1,1664 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 22, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 14, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 472, + 477 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "double", + "identifiers": [ + { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 64, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "range": [ + 56, + 65 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 32 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "optional": false, + "range": [ + 47, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 33 + } + } + }, + "range": [ + 38, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 33 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 484, + 490 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 526, + 532 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 56, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 484, + 490 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 507, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 526, + 532 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 29 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 231, + 236 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "double", + "range": [ + 238, + 244 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "double", + "range": [ + 38, + 44 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 472, + 477 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 472, + 477 + ], + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 47, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 70, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 217, + 224 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 403, + 410 + ], + "loc": { + "start": { + "line": 15, + "column": 3 + }, + "end": { + "line": 15, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-input.svelte new file mode 100644 index 00000000..8ed4e55f --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-input.svelte @@ -0,0 +1,28 @@ + + +
+ {#each messages as message} +

{message}

+ {/each} +
diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-no-unused-expressions-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-no-unused-expressions-result.json new file mode 100644 index 00000000..ff6ad292 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-no-unused-expressions-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "no-unused-expressions", + "code": "messages;", + "line": 13, + "column": 3 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-output.json new file mode 100644 index 00000000..aa092cde --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-output.json @@ -0,0 +1,3771 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "ImportDeclaration", + "source": { + "type": "Literal", + "raw": "'svelte'", + "value": "svelte", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "range": [ + 10, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "init": null, + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "range": [ + 43, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [], + "range": [ + 68, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + ], + "range": [ + 53, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "ReturnStatement", + "argument": null, + "range": [ + 115, + 122 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + "test": { + "type": "UnaryExpression", + "argument": { + "type": "Identifier", + "name": "div", + "range": [ + 110, + 113 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "operator": "!", + "prefix": true, + "range": [ + 109, + 113 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "range": [ + 105, + 122 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "Identifier", + "name": "messages", + "range": [ + 217, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "range": [ + 217, + 226 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "IfStatement", + "alternate": null, + "consequent": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 18 + } + } + }, + { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollHeight", + "range": [ + 385, + 397 + ], + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 36 + } + } + }, + "range": [ + 381, + 397 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 36 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollTo", + "range": [ + 369, + 377 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "range": [ + 365, + 377 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "optional": false, + "range": [ + 365, + 398 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "range": [ + 365, + 399 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 38 + } + } + } + ], + "range": [ + 359, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 353, + 404 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 19, + "column": 4 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "tick", + "range": [ + 341, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "optional": false, + "range": [ + 341, + 347 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "then", + "range": [ + 348, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "range": [ + 341, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + "optional": false, + "range": [ + 341, + 405 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + "range": [ + 341, + 406 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 19, + "column": 6 + } + } + } + ], + "range": [ + 336, + 410 + ], + "loc": { + "start": { + "line": 16, + "column": 64 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + "test": { + "type": "BinaryExpression", + "left": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "offsetHeight", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + "range": [ + 278, + 294 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + "operator": "+", + "right": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollTop", + "range": [ + 301, + 310 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + "range": [ + 297, + 310 + ], + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + "range": [ + 278, + 310 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + "operator": ">", + "right": { + "type": "BinaryExpression", + "left": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "div", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 44 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "scrollHeight", + "range": [ + 317, + 329 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 57 + } + } + }, + "range": [ + 313, + 329 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 57 + } + } + }, + "operator": "-", + "right": { + "type": "Literal", + "raw": "20", + "value": 20, + "range": [ + 332, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 60 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "range": [ + 313, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "range": [ + 278, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + "range": [ + 274, + 410 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 20, + "column": 3 + } + } + } + ], + "range": [ + 101, + 413 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 95, + 413 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 21, + "column": 2 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "$effect", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "pre", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "range": [ + 83, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + "optional": false, + "range": [ + 83, + 414 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + "range": [ + 83, + 415 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 21, + "column": 4 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 416, + 425 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + "range": [ + 0, + 425 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 425, + 427 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "div", + "range": [ + 428, + 431 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "Binding", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "this", + "range": [ + 437, + 441 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + "modifiers": [], + "range": [ + 432, + 441 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + "expression": { + "type": "Identifier", + "name": "div", + "range": [ + 443, + 446 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "shorthand": false, + "range": [ + 432, + 447 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 20 + } + } + } + ], + "selfClosing": false, + "range": [ + 427, + 448 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\t", + "range": [ + 448, + 450 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "context": { + "type": "Identifier", + "name": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 480, + 483 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "message", + "range": [ + 484, + 491 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "range": [ + 483, + 492 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 14 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 492, + 496 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "range": [ + 480, + 496 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 18 + } + } + } + ], + "else": null, + "range": [ + 450, + 505 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 505, + 506 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 28, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 506, + 512 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 6 + } + } + }, + "range": [ + 427, + 512 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 28, + "column": 6 + } + } + } + ], + "sourceType": "module", + "comments": [ + { + "type": "Line", + "value": " ...", + "range": [ + 74, + 80 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 7 + } + } + }, + { + "type": "Line", + "value": " not yet mounted", + "range": [ + 123, + 141 + ], + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 10, + "column": 38 + } + } + }, + { + "type": "Line", + "value": " reference `messages` so that this code re-runs whenever it changes", + "range": [ + 145, + 214 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 71 + } + } + }, + { + "type": "Line", + "value": " autoscroll when new messages are added", + "range": [ + 230, + 271 + ], + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 43 + } + } + } + ], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "import", + "range": [ + 10, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "from", + "range": [ + 26, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "String", + "value": "'svelte'", + "range": [ + 31, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 43, + 46 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 53, + 56 + ], + "loc": { + "start": { + "line": 5, + "column": 1 + }, + "end": { + "line": 5, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 90, + 91 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "pre", + "range": [ + 91, + 94 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 9, + "column": 13 + }, + "end": { + "line": 9, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 98, + 100 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 9, + "column": 19 + }, + "end": { + "line": 9, + "column": 20 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 105, + 107 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 108, + 109 + ], + "loc": { + "start": { + "line": 10, + "column": 5 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "!", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 10, + "column": 6 + }, + "end": { + "line": 10, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 110, + 113 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 115, + 121 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 217, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 225, + 226 + ], + "loc": { + "start": { + "line": 13, + "column": 10 + }, + "end": { + "line": 13, + "column": 11 + } + } + }, + { + "type": "Keyword", + "value": "if", + "range": [ + 274, + 276 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 277, + 278 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 16, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "offsetHeight", + "range": [ + 282, + 294 + ], + "loc": { + "start": { + "line": 16, + "column": 10 + }, + "end": { + "line": 16, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 295, + 296 + ], + "loc": { + "start": { + "line": 16, + "column": 23 + }, + "end": { + "line": 16, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 300, + 301 + ], + "loc": { + "start": { + "line": 16, + "column": 28 + }, + "end": { + "line": 16, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "scrollTop", + "range": [ + 301, + 310 + ], + "loc": { + "start": { + "line": 16, + "column": 29 + }, + "end": { + "line": 16, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 311, + 312 + ], + "loc": { + "start": { + "line": 16, + "column": 39 + }, + "end": { + "line": 16, + "column": 40 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 44 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 316, + 317 + ], + "loc": { + "start": { + "line": 16, + "column": 44 + }, + "end": { + "line": 16, + "column": 45 + } + } + }, + { + "type": "Identifier", + "value": "scrollHeight", + "range": [ + 317, + 329 + ], + "loc": { + "start": { + "line": 16, + "column": 45 + }, + "end": { + "line": 16, + "column": 57 + } + } + }, + { + "type": "Punctuator", + "value": "-", + "range": [ + 330, + 331 + ], + "loc": { + "start": { + "line": 16, + "column": 58 + }, + "end": { + "line": 16, + "column": 59 + } + } + }, + { + "type": "Numeric", + "value": "20", + "range": [ + 332, + 334 + ], + "loc": { + "start": { + "line": 16, + "column": 60 + }, + "end": { + "line": 16, + "column": 62 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 334, + 335 + ], + "loc": { + "start": { + "line": 16, + "column": 62 + }, + "end": { + "line": 16, + "column": 63 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 336, + 337 + ], + "loc": { + "start": { + "line": 16, + "column": 64 + }, + "end": { + "line": 16, + "column": 65 + } + } + }, + { + "type": "Identifier", + "value": "tick", + "range": [ + 341, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 345, + 346 + ], + "loc": { + "start": { + "line": 17, + "column": 7 + }, + "end": { + "line": 17, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 346, + 347 + ], + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 347, + 348 + ], + "loc": { + "start": { + "line": 17, + "column": 9 + }, + "end": { + "line": 17, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "then", + "range": [ + 348, + 352 + ], + "loc": { + "start": { + "line": 17, + "column": 10 + }, + "end": { + "line": 17, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 352, + 353 + ], + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 353, + 354 + ], + "loc": { + "start": { + "line": 17, + "column": 15 + }, + "end": { + "line": 17, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 354, + 355 + ], + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 356, + 358 + ], + "loc": { + "start": { + "line": 17, + "column": 18 + }, + "end": { + "line": 17, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 359, + 360 + ], + "loc": { + "start": { + "line": 17, + "column": 21 + }, + "end": { + "line": 17, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 368, + 369 + ], + "loc": { + "start": { + "line": 18, + "column": 7 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "scrollTo", + "range": [ + 369, + 377 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 377, + 378 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 378, + 379 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 379, + 380 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 384, + 385 + ], + "loc": { + "start": { + "line": 18, + "column": 23 + }, + "end": { + "line": 18, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "scrollHeight", + "range": [ + 385, + 397 + ], + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 397, + 398 + ], + "loc": { + "start": { + "line": 18, + "column": 36 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 398, + 399 + ], + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 18, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 403, + 404 + ], + "loc": { + "start": { + "line": 19, + "column": 3 + }, + "end": { + "line": 19, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 404, + 405 + ], + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 405, + 406 + ], + "loc": { + "start": { + "line": 19, + "column": 5 + }, + "end": { + "line": 19, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 409, + 410 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 412, + 413 + ], + "loc": { + "start": { + "line": 21, + "column": 1 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 413, + 414 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 414, + 415 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 416, + 417 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 417, + 418 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 418, + 424 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 424, + 425 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 425, + 427 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 427, + 428 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 428, + 431 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "bind", + "range": [ + 432, + 436 + ], + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 436, + 437 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "this", + "range": [ + 437, + 441 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 441, + 442 + ], + "loc": { + "start": { + "line": 24, + "column": 14 + }, + "end": { + "line": 24, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 442, + 443 + ], + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "div", + "range": [ + 443, + 446 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 446, + 447 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 447, + 448 + ], + "loc": { + "start": { + "line": 24, + "column": 20 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 448, + 450 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 25, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 450, + 451 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 25, + "column": 2 + } + } + }, + { + "type": "MustacheKeyword", + "value": "#each", + "range": [ + 451, + 456 + ], + "loc": { + "start": { + "line": 25, + "column": 2 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + { + "type": "Keyword", + "value": "as", + "range": [ + 466, + 468 + ], + "loc": { + "start": { + "line": 25, + "column": 17 + }, + "end": { + "line": 25, + "column": 19 + } + } + }, + { + "type": "Identifier", + "value": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 25, + "column": 27 + }, + "end": { + "line": 25, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 3 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 482, + 483 + ], + "loc": { + "start": { + "line": 26, + "column": 4 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 483, + 484 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "message", + "range": [ + 484, + 491 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 26, + "column": 13 + }, + "end": { + "line": 26, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 492, + 493 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 493, + 494 + ], + "loc": { + "start": { + "line": 26, + "column": 15 + }, + "end": { + "line": 26, + "column": 16 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 494, + 495 + ], + "loc": { + "start": { + "line": 26, + "column": 16 + }, + "end": { + "line": 26, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 495, + 496 + ], + "loc": { + "start": { + "line": 26, + "column": 17 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 498, + 499 + ], + "loc": { + "start": { + "line": 27, + "column": 1 + }, + "end": { + "line": 27, + "column": 2 + } + } + }, + { + "type": "MustacheKeyword", + "value": "/each", + "range": [ + 499, + 504 + ], + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 27, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 504, + 505 + ], + "loc": { + "start": { + "line": 27, + "column": 7 + }, + "end": { + "line": 27, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 505, + 506 + ], + "loc": { + "start": { + "line": 27, + "column": 8 + }, + "end": { + "line": 28, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 28, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 507, + 508 + ], + "loc": { + "start": { + "line": 28, + "column": 1 + }, + "end": { + "line": 28, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "div", + "range": [ + 508, + 511 + ], + "loc": { + "start": { + "line": 28, + "column": 2 + }, + "end": { + "line": 28, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 28, + "column": 5 + }, + "end": { + "line": 28, + "column": 6 + } + } + } + ], + "range": [ + 0, + 513 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 29, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-prefer-const-result.json new file mode 100644 index 00000000..f1aa55a2 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "messages", + "line": 5, + "column": 6 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json new file mode 100644 index 00000000..cda877e9 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output.json new file mode 100644 index 00000000..ab3d910e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output.json @@ -0,0 +1,2152 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "tick", + "identifiers": [ + { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "ImportBinding", + "name": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "ImportSpecifier", + "imported": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "local": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 341, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "div", + "identifiers": [ + { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + "init": null, + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 110, + 113 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 443, + 446 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + }, + { + "name": "messages", + "identifiers": [ + { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "init": { + "type": "ArrayExpression", + "elements": [], + "range": [ + 68, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + "range": [ + 57, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 18 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 217, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 443, + 446 + ], + "loc": { + "start": { + "line": 24, + "column": 16 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 110, + 113 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 217, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ], + "childScopes": [ + { + "type": "block", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 341, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 341, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 110, + 113 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "messages", + "range": [ + 217, + 225 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 10 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "messages", + "range": [ + 57, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 278, + 281 + ], + "loc": { + "start": { + "line": 16, + "column": 6 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 297, + 300 + ], + "loc": { + "start": { + "line": 16, + "column": 25 + }, + "end": { + "line": 16, + "column": 28 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 313, + 316 + ], + "loc": { + "start": { + "line": 16, + "column": 41 + }, + "end": { + "line": 16, + "column": 44 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "tick", + "range": [ + 341, + 345 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + "from": "block", + "init": null, + "resolved": { + "type": "Identifier", + "name": "tick", + "range": [ + 19, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 365, + 368 + ], + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "div", + "range": [ + 381, + 384 + ], + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "div", + "range": [ + 47, + 50 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 8 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "message", + "identifiers": [ + { + "type": "Identifier", + "name": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + } + ], + "defs": [ + { + "type": "Parameter", + "name": { + "type": "Identifier", + "name": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + }, + "node": { + "type": "SvelteEachBlock", + "expression": { + "type": "Identifier", + "name": "messages", + "range": [ + 457, + 465 + ], + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + "context": { + "type": "Identifier", + "name": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + }, + "index": null, + "key": null, + "children": [ + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 26, + "column": 3 + }, + "end": { + "line": 26, + "column": 4 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 480, + 483 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 5 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "message", + "range": [ + 484, + 491 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "range": [ + 483, + 492 + ], + "loc": { + "start": { + "line": 26, + "column": 5 + }, + "end": { + "line": 26, + "column": 14 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 492, + 496 + ], + "loc": { + "start": { + "line": 26, + "column": 14 + }, + "end": { + "line": 26, + "column": 18 + } + } + }, + "range": [ + 480, + 496 + ], + "loc": { + "start": { + "line": 26, + "column": 2 + }, + "end": { + "line": 26, + "column": 18 + } + } + } + ], + "else": null, + "range": [ + 450, + 505 + ], + "loc": { + "start": { + "line": 25, + "column": 1 + }, + "end": { + "line": 27, + "column": 8 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 484, + 491 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "message", + "range": [ + 484, + 491 + ], + "loc": { + "start": { + "line": 26, + "column": 6 + }, + "end": { + "line": 26, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "message", + "range": [ + 469, + 476 + ], + "loc": { + "start": { + "line": 25, + "column": 20 + }, + "end": { + "line": 25, + "column": 27 + } + } + } + } + ], + "childScopes": [], + "through": [] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 83, + 90 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-input.svelte new file mode 100644 index 00000000..9f8ddff5 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-input.svelte @@ -0,0 +1,3 @@ + diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-no-unused-vars-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-no-unused-vars-result.json new file mode 100644 index 00000000..2f801b22 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-no-unused-vars-result.json @@ -0,0 +1,14 @@ +[ + { + "ruleId": "no-unused-vars", + "code": "optionalProp", + "line": 2, + "column": 11 + }, + { + "ruleId": "no-unused-vars", + "code": "requiredProp", + "line": 2, + "column": 30 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-output.json new file mode 100644 index 00000000..767af0de --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-output.json @@ -0,0 +1,699 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 34, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 19, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 19, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + } + ], + "range": [ + 17, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 55, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 54 + } + } + }, + "range": [ + 17, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 54 + } + } + } + ], + "range": [ + 13, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 55 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 65, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 0, + 74 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 13, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 34, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 42 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 44 + }, + "end": { + "line": 2, + "column": 45 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 52 + }, + "end": { + "line": 2, + "column": 53 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 62, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 53 + }, + "end": { + "line": 2, + "column": 54 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 63, + 64 + ], + "loc": { + "start": { + "line": 2, + "column": 54 + }, + "end": { + "line": 2, + "column": 55 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 65, + 66 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 67, + 73 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "range": [ + 0, + 75 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-prefer-const-result.json new file mode 100644 index 00000000..0f3914ff --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-prefer-const-result.json @@ -0,0 +1,14 @@ +[ + { + "ruleId": "prefer-const", + "code": "optionalProp", + "line": 2, + "column": 11 + }, + { + "ruleId": "prefer-const", + "code": "requiredProp", + "line": 2, + "column": 30 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json new file mode 100644 index 00000000..f9e56e32 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output.json new file mode 100644 index 00000000..6a56a722 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output.json @@ -0,0 +1,913 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "optionalProp", + "identifiers": [ + { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 34, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 19, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 19, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + } + ], + "range": [ + 17, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 55, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 54 + } + } + }, + "range": [ + 17, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ] + }, + { + "name": "requiredProp", + "identifiers": [ + { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "AssignmentPattern", + "left": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "right": { + "type": "Literal", + "raw": "42", + "value": 42, + "range": [ + 34, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 19, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 19, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + } + ], + "range": [ + 17, + 52 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 43 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "optional": false, + "range": [ + 55, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 54 + } + } + }, + "range": [ + 17, + 63 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 54 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "optionalProp", + "range": [ + 19, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "requiredProp", + "range": [ + 38, + 50 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 41 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 55, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 46 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-input.svelte new file mode 100644 index 00000000..c3d4c6a4 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-input.svelte @@ -0,0 +1,3 @@ + diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-no-unused-vars-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-no-unused-vars-result.json new file mode 100644 index 00000000..a42744a8 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-no-unused-vars-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "no-unused-vars", + "code": "theCatch", + "line": 2, + "column": 18 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-output.json new file mode 100644 index 00000000..11f6e0a4 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-output.json @@ -0,0 +1,570 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "catch", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 19, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "range": [ + 17, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + ], + "range": [ + 13, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 39 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 49, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 0, + 58 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 13, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "catch", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 24, + 25 + ], + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 37, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 36 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 47, + 48 + ], + "loc": { + "start": { + "line": 2, + "column": 38 + }, + "end": { + "line": 2, + "column": 39 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 50, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "range": [ + 0, + 59 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-prefer-const-result.json new file mode 100644 index 00000000..7874e547 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "theCatch", + "line": 2, + "column": 18 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-requirements.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-requirements.json new file mode 100644 index 00000000..ba9b7a52 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-requirements.json @@ -0,0 +1,5 @@ +{ + "test": { + "eslint": ">=8.0.0" + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json new file mode 100644 index 00000000..7167c010 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output.json new file mode 100644 index 00000000..2b5aa6ea --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output.json @@ -0,0 +1,389 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "theCatch", + "identifiers": [ + { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "catch", + "range": [ + 19, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "range": [ + 19, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + ], + "range": [ + 17, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 39, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "theCatch", + "range": [ + 26, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 25 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 39, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-input.svelte new file mode 100644 index 00000000..1c4db2a1 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-input.svelte @@ -0,0 +1,3 @@ + diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-no-unused-vars-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-no-unused-vars-result.json new file mode 100644 index 00000000..ae6a736e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-no-unused-vars-result.json @@ -0,0 +1,26 @@ +[ + { + "ruleId": "no-unused-vars", + "code": "a", + "line": 2, + "column": 11 + }, + { + "ruleId": "no-unused-vars", + "code": "b", + "line": 2, + "column": 14 + }, + { + "ruleId": "no-unused-vars", + "code": "c", + "line": 2, + "column": 17 + }, + { + "ruleId": "no-unused-vars", + "code": "everythingElse", + "line": 2, + "column": 23 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-output.json new file mode 100644 index 00000000..080cd01a --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-output.json @@ -0,0 +1,809 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "range": [ + 28, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "optional": false, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + "range": [ + 17, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 49 + } + } + } + ], + "range": [ + 13, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 50 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 60, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + "range": [ + 0, + 69 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 13, + 16 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 23, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 26, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "...", + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 37 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 48, + 49 + ], + "loc": { + "start": { + "line": 2, + "column": 39 + }, + "end": { + "line": 2, + "column": 40 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 47 + }, + "end": { + "line": 2, + "column": 48 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 48 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 2, + "column": 49 + }, + "end": { + "line": 2, + "column": 50 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 3, + "column": 1 + }, + "end": { + "line": 3, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 62, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + } + ], + "range": [ + 0, + 70 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-prefer-const-result.json new file mode 100644 index 00000000..ed9c5e82 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-prefer-const-result.json @@ -0,0 +1,26 @@ +[ + { + "ruleId": "prefer-const", + "code": "a", + "line": 2, + "column": 11 + }, + { + "ruleId": "prefer-const", + "code": "b", + "line": 2, + "column": 14 + }, + { + "ruleId": "prefer-const", + "code": "c", + "line": 2, + "column": 17 + }, + { + "ruleId": "prefer-const", + "code": "everythingElse", + "line": 2, + "column": 23 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json new file mode 100644 index 00000000..ea45e122 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output.json new file mode 100644 index 00000000..308e284e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output.json @@ -0,0 +1,1759 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "range": [ + 28, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "optional": false, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + "range": [ + 17, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 49 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "range": [ + 28, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "optional": false, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + "range": [ + 17, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 49 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + } + ] + }, + { + "name": "c", + "identifiers": [ + { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "range": [ + 28, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "optional": false, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + "range": [ + 17, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 49 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + } + ] + }, + { + "name": "everythingElse", + "identifiers": [ + { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "range": [ + 28, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + ], + "range": [ + 17, + 47 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "optional": false, + "range": [ + 50, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 49 + } + } + }, + "range": [ + 17, + 58 + ], + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 49 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 19, + 20 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 22, + 23 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 25, + 26 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 31, + 45 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 36 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 50, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 41 + }, + "end": { + "line": 2, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-input.svelte new file mode 100644 index 00000000..9fa47908 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-input.svelte @@ -0,0 +1,4 @@ + diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-no-unused-vars-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-no-unused-vars-result.json new file mode 100644 index 00000000..70377cef --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-no-unused-vars-result.json @@ -0,0 +1,26 @@ +[ + { + "ruleId": "no-unused-vars", + "code": "a", + "line": 3, + "column": 11 + }, + { + "ruleId": "no-unused-vars", + "code": "b", + "line": 3, + "column": 14 + }, + { + "ruleId": "no-unused-vars", + "code": "c", + "line": 3, + "column": 17 + }, + { + "ruleId": "no-unused-vars", + "code": "everythingElse", + "line": 3, + "column": 23 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-output.json new file mode 100644 index 00000000..9ce52f34 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-output.json @@ -0,0 +1,1208 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "body": [ + { + "type": "TSTypeAliasDeclaration", + "id": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [], + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 23, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 60, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "range": [ + 49, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "range": [ + 88, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + "range": [ + 82, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 58 + } + } + }, + "range": [ + 49, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 58 + } + } + } + ], + "range": [ + 45, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 59 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 101, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "range": [ + 0, + 110 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "type", + "range": [ + 23, + 27 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 36, + 37 + ], + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 45, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 3, + "column": 11 + }, + "end": { + "line": 3, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 17 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "...", + "range": [ + 60, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Identifier", + "value": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 37 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 39 + }, + "end": { + "line": 3, + "column": 40 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 88, + 89 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 48 + } + } + }, + { + "type": "Identifier", + "value": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 55 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 97, + 98 + ], + "loc": { + "start": { + "line": 3, + "column": 56 + }, + "end": { + "line": 3, + "column": 57 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 57 + }, + "end": { + "line": 3, + "column": 58 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 99, + 100 + ], + "loc": { + "start": { + "line": 3, + "column": 58 + }, + "end": { + "line": 3, + "column": 59 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 103, + 109 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + } + ], + "range": [ + 0, + 111 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-prefer-const-result.json new file mode 100644 index 00000000..368783a9 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-prefer-const-result.json @@ -0,0 +1,26 @@ +[ + { + "ruleId": "prefer-const", + "code": "a", + "line": 3, + "column": 11 + }, + { + "ruleId": "prefer-const", + "code": "b", + "line": 3, + "column": 14 + }, + { + "ruleId": "prefer-const", + "code": "c", + "line": 3, + "column": 17 + }, + { + "ruleId": "prefer-const", + "code": "everythingElse", + "line": 3, + "column": 23 + } +] \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-requirements.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-requirements.json new file mode 100644 index 00000000..e03dc5ca --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-requirements.json @@ -0,0 +1,8 @@ +{ + "test": { + "@typescript-eslint/parser": ">=6.0.0" + }, + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json new file mode 100644 index 00000000..e4776104 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json @@ -0,0 +1,70 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output.json new file mode 100644 index 00000000..e81f27c0 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output.json @@ -0,0 +1,2160 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "MyProps", + "identifiers": [ + { + "type": "Identifier", + "name": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + ], + "defs": [ + { + "type": "Type", + "name": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "node": { + "type": "TSTypeAliasDeclaration", + "id": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + "typeAnnotation": { + "type": "TSTypeLiteral", + "members": [], + "range": [ + 38, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "range": [ + 23, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 4 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 60, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "range": [ + 49, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "range": [ + 88, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + "range": [ + 82, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 58 + } + } + }, + "range": [ + 49, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 58 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 60, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "range": [ + 49, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "range": [ + 88, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + "range": [ + 82, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 58 + } + } + }, + "range": [ + 49, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 58 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + } + ] + }, + { + "name": "c", + "identifiers": [ + { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 60, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "range": [ + 49, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "range": [ + 88, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + "range": [ + 82, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 58 + } + } + }, + "range": [ + 49, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 58 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + } + ] + }, + { + "name": "everythingElse", + "identifiers": [ + { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "optional": false, + "range": [ + 60, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "range": [ + 49, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + } + ], + "range": [ + 88, + 97 + ], + "loc": { + "start": { + "line": 3, + "column": 47 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + "range": [ + 82, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 58 + } + } + }, + "range": [ + 49, + 99 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 58 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 51, + 52 + ], + "loc": { + "start": { + "line": 3, + "column": 10 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 63, + 77 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 89, + 96 + ], + "loc": { + "start": { + "line": 3, + "column": 48 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 28, + 35 + ], + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 82, + 88 + ], + "loc": { + "start": { + "line": 3, + "column": 41 + }, + "end": { + "line": 3, + "column": 47 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-input.svelte new file mode 100644 index 00000000..49126eaa --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-input.svelte @@ -0,0 +1,2 @@ + + diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-output.json new file mode 100644 index 00000000..739d2d05 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-output.json @@ -0,0 +1,390 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteHTMLComment", + "value": " this can be `true` or `false` ", + "range": [ + 0, + 38 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 2, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "special", + "name": { + "type": "SvelteName", + "name": "svelte:options", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "runes", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Literal", + "raw": "true", + "value": true, + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + "range": [ + 61, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "range": [ + 55, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 28 + } + } + } + ], + "selfClosing": true, + "range": [ + 39, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 31 + } + } + }, + "children": [], + "endTag": null, + "range": [ + 39, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "HTMLComment", + "value": "", + "range": [ + 0, + 38 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 38, + 39 + ], + "loc": { + "start": { + "line": 1, + "column": 38 + }, + "end": { + "line": 2, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "svelte:options", + "range": [ + 40, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "runes", + "range": [ + 55, + 60 + ], + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Boolean", + "value": "true", + "range": [ + 62, + 66 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 66, + 67 + ], + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 2, + "column": 29 + }, + "end": { + "line": 2, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 2, + "column": 30 + }, + "end": { + "line": 2, + "column": 31 + } + } + } + ], + "range": [ + 0, + 71 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json new file mode 100644 index 00000000..788b5785 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json @@ -0,0 +1,52 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json new file mode 100644 index 00000000..0a76a99d --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json @@ -0,0 +1,58 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [], + "references": [], + "childScopes": [], + "through": [] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-input.svelte new file mode 100644 index 00000000..66619ed4 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-input.svelte @@ -0,0 +1,11 @@ + + + diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-output.json new file mode 100644 index 00000000..49e3817b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-output.json @@ -0,0 +1,1421 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 22, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 14, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 10, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 60, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 56, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [ + 44, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [ + 35, + 74 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 75, + 84 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + "range": [ + 0, + 84 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 9, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 94, + 102 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + "expression": { + "type": "Identifier", + "name": "increment", + "range": [ + 104, + 113 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "range": [ + 94, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "selfClosing": false, + "range": [ + 86, + 115 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\tclicks: ", + "range": [ + 115, + 125 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [ + 125, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 133, + 142 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + }, + "range": [ + 86, + 142 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 10, + 13 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 14, + 19 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 20, + 21 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 28, + 29 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 35, + 43 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 44, + 53 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 60, + 65 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "+=", + "range": [ + 66, + 68 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Numeric", + "value": "1", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 73, + 74 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 7, + "column": 1 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 77, + 83 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 84, + 86 + ], + "loc": { + "start": { + "line": 7, + "column": 9 + }, + "end": { + "line": 9, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 87, + 93 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 94, + 96 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 96, + 97 + ], + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 97, + 102 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 102, + 103 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 103, + 104 + ], + "loc": { + "start": { + "line": 9, + "column": 17 + }, + "end": { + "line": 9, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 104, + 113 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 9, + "column": 27 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 9, + "column": 28 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 115, + 117 + ], + "loc": { + "start": { + "line": 9, + "column": 29 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "clicks:", + "range": [ + 117, + 124 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 16 + }, + "end": { + "line": 11, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 133, + 134 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 135, + 141 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 11, + "column": 8 + }, + "end": { + "line": 11, + "column": 9 + } + } + } + ], + "range": [ + 0, + 143 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 12, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json new file mode 100644 index 00000000..d35c8eda --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 22, + 28 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json new file mode 100644 index 00000000..72a6091e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json @@ -0,0 +1,715 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [29, 30], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [22, 31], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [14, 31], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [60, 65], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [126, 131], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "increment", + "identifiers": [ + { + "type": "Identifier", + "name": "increment", + "range": [44, 53], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "increment", + "range": [44, 53], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [60, 65], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [69, 70], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [60, 70], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [60, 71], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [56, 74], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [44, 53], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [35, 74], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [104, 113], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [44, 53], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [104, 113], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [44, 53], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [126, 131], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [60, 65], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [60, 65], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [14, 19], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [22, 28], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-input.svelte b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-input.svelte new file mode 100644 index 00000000..05fb97ef --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-input.svelte @@ -0,0 +1,20 @@ + + + diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-output.json new file mode 100644 index 00000000..eaf4bc74 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-output.json @@ -0,0 +1,2411 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + "body": [ + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 43, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 51, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "range": [ + 43, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 23 + } + } + } + ], + "range": [ + 39, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 91, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [ + 91, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [ + 91, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [ + 86, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [ + 74, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "params": [], + "range": [ + 65, + 106 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 143, + 148 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "range": [ + 136, + 148 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 29 + } + } + } + ], + "range": [ + 134, + 150 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 131, + 150 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + "range": [ + 122, + 150 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "increment", + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "increment", + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + } + ], + "range": [ + 117, + 168 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [ + 110, + 169 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [ + 35, + 172 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "createCounter", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "params": [], + "range": [ + 10, + 172 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "counter", + "range": [ + 181, + 188 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createCounter", + "range": [ + 191, + 204 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "optional": false, + "range": [ + 191, + 206 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "range": [ + 181, + 206 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 32 + } + } + } + ], + "range": [ + 175, + 207 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 33 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 208, + 217 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + "range": [ + 0, + 217 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 217, + 219 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 18, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 220, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 227, + 235 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "counter", + "range": [ + 237, + 244 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "increment", + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 18, + "column": 26 + }, + "end": { + "line": 18, + "column": 35 + } + } + }, + "range": [ + 237, + 254 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 35 + } + } + }, + "range": [ + 227, + 255 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 36 + } + } + } + ], + "selfClosing": false, + "range": [ + 219, + 256 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n\tclicks: ", + "range": [ + 256, + 266 + ], + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "counter", + "range": [ + 267, + 274 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "count", + "range": [ + 275, + 280 + ], + "loc": { + "start": { + "line": 19, + "column": 18 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + "range": [ + 267, + 280 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + "range": [ + 266, + 281 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 20, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 282, + 291 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 9 + } + } + }, + "range": [ + 219, + 291 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 7, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 10, + 18 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "createCounter", + "range": [ + 19, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 33, + 34 + ], + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 35, + 36 + ], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 39, + 42 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 43, + 48 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 49, + 50 + ], + "loc": { + "start": { + "line": 3, + "column": 12 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 57, + 58 + ], + "loc": { + "start": { + "line": 3, + "column": 20 + }, + "end": { + "line": 3, + "column": 21 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 59, + 60 + ], + "loc": { + "start": { + "line": 3, + "column": 22 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 23 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 65, + 73 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 74, + 83 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 5, + "column": 20 + }, + "end": { + "line": 5, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 5, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 86, + 87 + ], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 5, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 91, + 96 + ], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "+=", + "range": [ + 97, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 9 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "Numeric", + "value": "1", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 101, + 102 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 105, + 106 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 110, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 9, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "get", + "range": [ + 122, + 125 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 126, + 131 + ], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 131, + 132 + ], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 10, + "column": 13 + }, + "end": { + "line": 10, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 134, + 135 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 136, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 143, + 148 + ], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 149, + 150 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 155, + 164 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 167, + 168 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 168, + 169 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 12, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Keyword", + "value": "const", + "range": [ + 175, + 180 + ], + "loc": { + "start": { + "line": 15, + "column": 1 + }, + "end": { + "line": 15, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "counter", + "range": [ + 181, + 188 + ], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 189, + 190 + ], + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": "Identifier", + "value": "createCounter", + "range": [ + 191, + 204 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 204, + 205 + ], + "loc": { + "start": { + "line": 15, + "column": 30 + }, + "end": { + "line": 15, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 205, + 206 + ], + "loc": { + "start": { + "line": 15, + "column": 31 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 206, + 207 + ], + "loc": { + "start": { + "line": 15, + "column": 32 + }, + "end": { + "line": 15, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 208, + 209 + ], + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 209, + 210 + ], + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 210, + 216 + ], + "loc": { + "start": { + "line": 16, + "column": 2 + }, + "end": { + "line": 16, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 216, + 217 + ], + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 217, + 219 + ], + "loc": { + "start": { + "line": 16, + "column": 9 + }, + "end": { + "line": 18, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 219, + 220 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 220, + 226 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 227, + 229 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 229, + 230 + ], + "loc": { + "start": { + "line": 18, + "column": 10 + }, + "end": { + "line": 18, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 230, + 235 + ], + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 235, + 236 + ], + "loc": { + "start": { + "line": 18, + "column": 16 + }, + "end": { + "line": 18, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 236, + 237 + ], + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "counter", + "range": [ + 237, + 244 + ], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 244, + 245 + ], + "loc": { + "start": { + "line": 18, + "column": 25 + }, + "end": { + "line": 18, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 245, + 254 + ], + "loc": { + "start": { + "line": 18, + "column": 26 + }, + "end": { + "line": 18, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 254, + 255 + ], + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 18, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 255, + 256 + ], + "loc": { + "start": { + "line": 18, + "column": 36 + }, + "end": { + "line": 18, + "column": 37 + } + } + }, + { + "type": "HTMLText", + "value": "\n\t", + "range": [ + 256, + 258 + ], + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 19, + "column": 1 + } + } + }, + { + "type": "HTMLText", + "value": "clicks:", + "range": [ + 258, + 265 + ], + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 8 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 265, + 266 + ], + "loc": { + "start": { + "line": 19, + "column": 8 + }, + "end": { + "line": 19, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 266, + 267 + ], + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "counter", + "range": [ + 267, + 274 + ], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 274, + 275 + ], + "loc": { + "start": { + "line": 19, + "column": 17 + }, + "end": { + "line": 19, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 275, + 280 + ], + "loc": { + "start": { + "line": 19, + "column": 18 + }, + "end": { + "line": 19, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 280, + 281 + ], + "loc": { + "start": { + "line": 19, + "column": 23 + }, + "end": { + "line": 19, + "column": 24 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 281, + 282 + ], + "loc": { + "start": { + "line": 19, + "column": 24 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 282, + 283 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 283, + 284 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 284, + 290 + ], + "loc": { + "start": { + "line": 20, + "column": 2 + }, + "end": { + "line": 20, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 290, + 291 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 9 + } + } + } + ], + "range": [ + 0, + 292 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 21, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json new file mode 100644 index 00000000..5e931015 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json @@ -0,0 +1,76 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 51, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json new file mode 100644 index 00000000..2accb895 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json @@ -0,0 +1,1645 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [51, 57], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createCounter", + "identifiers": [ + { + "type": "Identifier", + "name": "createCounter", + "range": [19, 32], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "createCounter", + "range": [19, 32], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [58, 59], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [51, 57], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "optional": false, + "range": [51, 60], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "range": [43, 60], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 23 + } + } + } + ], + "range": [39, 61], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [91, 96], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [100, 101], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [91, 101], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [91, 102], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [86, 106], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "params": [], + "range": [65, 106], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [126, 131], + "loc": { + "start": { + "line": 10, + "column": 7 + }, + "end": { + "line": 10, + "column": 12 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "count", + "range": [143, 148], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "range": [136, 148], + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 29 + } + } + } + ], + "range": [134, 150], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [131, 150], + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + "range": [122, 150], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "increment", + "range": [155, 164], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "increment", + "range": [155, 164], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "range": [155, 164], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + } + ], + "range": [117, 168], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + "range": [110, 169], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 12, + "column": 4 + } + } + } + ], + "range": [35, 172], + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "createCounter", + "range": [19, 32], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "params": [], + "range": [10, 172], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "createCounter", + "range": [191, 204], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createCounter", + "range": [19, 32], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ] + }, + { + "name": "counter", + "identifiers": [ + { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "createCounter", + "range": [191, 204], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "optional": false, + "range": [191, 206], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + "range": [181, 206], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 32 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [237, 244], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [267, 274], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "createCounter", + "range": [191, 204], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "createCounter", + "range": [19, 32], + "loc": { + "start": { + "line": 2, + "column": 10 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [237, 244], + "loc": { + "start": { + "line": 18, + "column": 18 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "counter", + "range": [267, 274], + "loc": { + "start": { + "line": 19, + "column": 10 + }, + "end": { + "line": 19, + "column": 17 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "counter", + "range": [181, 188], + "loc": { + "start": { + "line": 15, + "column": 7 + }, + "end": { + "line": 15, + "column": 14 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [58, 59], + "loc": { + "start": { + "line": 3, + "column": 21 + }, + "end": { + "line": 3, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [51, 57], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "optional": false, + "range": [51, 60], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 23 + } + } + }, + "range": [43, 60], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [91, 96], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [143, 148], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + }, + { + "name": "increment", + "identifiers": [ + { + "type": "Identifier", + "name": "increment", + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "increment", + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [91, 96], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [100, 101], + "loc": { + "start": { + "line": 6, + "column": 12 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [91, 101], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [91, 102], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [86, 106], + "loc": { + "start": { + "line": 5, + "column": 23 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + }, + "params": [], + "range": [65, 106], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [155, 164], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [51, 57], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [155, 164], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [74, 83], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 20 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [91, 96], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [91, 96], + "loc": { + "start": { + "line": 6, + "column": 3 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [143, 148], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [143, 148], + "loc": { + "start": { + "line": 10, + "column": 24 + }, + "end": { + "line": 10, + "column": 29 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [43, 48], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [51, 57], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [51, 57], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 20 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-input.svelte.js b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-input.svelte.js new file mode 100644 index 00000000..73af2497 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-input.svelte.js @@ -0,0 +1,14 @@ +export function createCounter() { + let count = $state(0); + + function increment() { + count += 1; + } + + return { + get count() { + return count; + }, + increment + }; +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-output.json new file mode 100644 index 00000000..120d785e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-output.json @@ -0,0 +1,1270 @@ +{ + "type": "Program", + "body": [ + { + "type": "ExportNamedDeclaration", + "declaration": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 47, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 47, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 39, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 35, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 85, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 85, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 81, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [ + 60, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 117, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + ], + "range": [ + 125, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 122, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "range": [ + 113, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "increment", + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "increment", + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ], + "range": [ + 109, + 163 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "range": [ + 102, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 13, + "column": 3 + } + } + } + ], + "range": [ + 32, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "createCounter", + "range": [ + 16, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "params": [], + "range": [ + 7, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "source": null, + "specifiers": [], + "range": [ + 0, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Keyword", + "value": "export", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 7, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "createCounter", + "range": [ + 16, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 35, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 47, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "+=", + "range": [ + 91, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Numeric", + "value": "1", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 102, + 108 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "get", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 117, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 130, + 136 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + ], + "range": [ + 0, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-scope-output.json new file mode 100644 index 00000000..25b0f142 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-scope-output.json @@ -0,0 +1,1251 @@ +{ + "type": "global", + "variables": [ + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createCounter", + "identifiers": [ + { + "type": "Identifier", + "name": "createCounter", + "range": [16, 29], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "createCounter", + "range": [16, 29], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [54, 55], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [47, 56], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [39, 56], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [35, 57], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [94, 95], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 95], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 96], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [81, 99], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [60, 99], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [117, 122], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [130, 143], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + ], + "range": [125, 147], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [122, 147], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "range": [113, 147], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ], + "range": [109, 163], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "range": [102, 164], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 13, + "column": 3 + } + } + } + ], + "range": [32, 166], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "createCounter", + "range": [16, 29], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "params": [], + "range": [7, 166], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [54, 55], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [47, 56], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [39, 56], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "increment", + "identifiers": [ + { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [94, 95], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 95], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 96], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [81, 99], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [60, 99], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-input.svelte.ts b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-input.svelte.ts new file mode 100644 index 00000000..73af2497 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-input.svelte.ts @@ -0,0 +1,14 @@ +export function createCounter() { + let count = $state(0); + + function increment() { + count += 1; + } + + return { + get count() { + return count; + }, + increment + }; +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-output.json new file mode 100644 index 00000000..2bec2091 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-output.json @@ -0,0 +1,1271 @@ +{ + "type": "Program", + "body": [ + { + "type": "ExportNamedDeclaration", + "declaration": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 47, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [ + 47, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [ + 39, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [ + 35, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 85, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [ + 85, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [ + 81, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [ + 60, + 99 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 117, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [ + 130, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + ], + "range": [ + 125, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 122, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "range": [ + 113, + 147 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "increment", + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "increment", + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ], + "range": [ + 109, + 163 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "range": [ + 102, + 164 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 13, + "column": 3 + } + } + } + ], + "range": [ + 32, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "createCounter", + "range": [ + 16, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "params": [], + "range": [ + 7, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "exportKind": "value", + "source": null, + "specifiers": [], + "range": [ + 0, + 166 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Keyword", + "value": "export", + "range": [ + 0, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 7, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "createCounter", + "range": [ + 16, + 29 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 30, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 30 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 32, + 33 + ], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 1, + "column": 33 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 35, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 39, + 44 + ], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 2, + "column": 11 + }, + "end": { + "line": 2, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 47, + 53 + ], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 53, + 54 + ], + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 55, + 56 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 56, + 57 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 85, + 90 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "+=", + "range": [ + 91, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Numeric", + "value": "1", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 12 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 102, + 108 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 109, + 110 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "get", + "range": [ + 113, + 116 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 117, + 122 + ], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 130, + 136 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 137, + 142 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 146, + 147 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 147, + 148 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 11, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "increment", + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + ], + "range": [ + 0, + 167 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-scope-output.json new file mode 100644 index 00000000..25b0f142 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-scope-output.json @@ -0,0 +1,1251 @@ +{ + "type": "global", + "variables": [ + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "createCounter", + "identifiers": [ + { + "type": "Identifier", + "name": "createCounter", + "range": [16, 29], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "createCounter", + "range": [16, 29], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [54, 55], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [47, 56], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [39, 56], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "range": [35, 57], + "loc": { + "start": { + "line": 2, + "column": 1 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [94, 95], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 95], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 96], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [81, 99], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [60, 99], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "get", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [117, 122], + "loc": { + "start": { + "line": 9, + "column": 6 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "method": false, + "shorthand": false, + "value": { + "type": "FunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ReturnStatement", + "argument": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "range": [130, 143], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 16 + } + } + } + ], + "range": [125, 147], + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [122, 147], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + "range": [113, 147], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + } + ], + "range": [109, 163], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "range": [102, 164], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 13, + "column": 3 + } + } + } + ], + "range": [32, 166], + "loc": { + "start": { + "line": 1, + "column": 32 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "createCounter", + "range": [16, 29], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + "params": [], + "range": [7, 166], + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 14, + "column": 1 + } + } + } + } + ], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [54, 55], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "optional": false, + "range": [47, 56], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + "range": [39, 56], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "name": "increment", + "identifiers": [ + { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "FunctionName", + "name": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "node": { + "type": "FunctionDeclaration", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "AssignmentExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "operator": "+=", + "right": { + "type": "Literal", + "raw": "1", + "value": 1, + "range": [94, 95], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 95], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + "range": [85, 96], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 13 + } + } + } + ], + "range": [81, 99], + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 6, + "column": 2 + } + } + }, + "expression": false, + "generator": false, + "id": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + "params": [], + "range": [60, 99], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 6, + "column": 2 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + }, + "from": "function", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "increment", + "range": [151, 160], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "increment", + "range": [69, 78], + "loc": { + "start": { + "line": 4, + "column": 10 + }, + "end": { + "line": 4, + "column": 19 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [85, 90], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 7 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + }, + { + "type": "function", + "variables": [ + { + "name": "arguments", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [137, 142], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 15 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [39, 44], + "loc": { + "start": { + "line": 2, + "column": 5 + }, + "end": { + "line": 2, + "column": 10 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [47, 53], + "loc": { + "start": { + "line": 2, + "column": 13 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-type-output.svelte.ts b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-type-output.svelte.ts new file mode 100644 index 00000000..08bfcd3b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/03-ts-type-output.svelte.ts @@ -0,0 +1,14 @@ +export function createCounter() { // createCounter: () => { readonly count: number; increment: () => void; } + let count = $state(0); // count: number, $state(0): 0 + + function increment() { // increment: () => void + count += 1; // count: number + } + + return { + get count() { // count: number + return count; // count: number + }, + increment // increment: () => void, increment: () => void + }; +} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json new file mode 100644 index 00000000..8fa82428 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json @@ -0,0 +1,93 @@ +{ + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 57, + 63 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + } + ] +} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json index ad84f430..dda12633 100644 --- a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json @@ -28,10 +28,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -51,10 +48,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -79,19 +73,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] @@ -108,10 +96,7 @@ { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -130,10 +115,7 @@ "name": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -150,10 +132,7 @@ "id": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -172,10 +151,7 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [ - 40, - 41 - ], + "range": [40, 41], "loc": { "start": { "line": 2, @@ -191,10 +167,7 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -207,10 +180,7 @@ } }, "optional": false, - "range": [ - 33, - 42 - ], + "range": [33, 42], "loc": { "start": { "line": 2, @@ -222,10 +192,7 @@ } } }, - "range": [ - 25, - 42 - ], + "range": [25, 42], "loc": { "start": { "line": 2, @@ -244,10 +211,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -264,10 +228,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -284,10 +245,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 103, - 108 - ], + "range": [103, 108], "loc": { "start": { "line": 6, @@ -304,10 +262,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -324,10 +279,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 125, - 130 - ], + "range": [125, 130], "loc": { "start": { "line": 7, @@ -344,10 +296,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -368,10 +317,7 @@ { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -390,10 +336,7 @@ "name": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -410,10 +353,7 @@ "id": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -431,10 +371,7 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -447,10 +384,7 @@ } }, "optional": false, - "range": [ - 57, - 65 - ], + "range": [57, 65], "loc": { "start": { "line": 3, @@ -462,10 +396,7 @@ } } }, - "range": [ - 50, - 65 - ], + "range": [50, 65], "loc": { "start": { "line": 3, @@ -484,10 +415,7 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -504,10 +432,7 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -528,10 +453,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -548,10 +470,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -568,10 +487,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -591,10 +507,7 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -611,10 +524,7 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [ - 50, - 54 - ], + "range": [50, 54], "loc": { "start": { "line": 3, @@ -631,10 +541,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -654,10 +561,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 125, - 130 - ], + "range": [125, 130], "loc": { "start": { "line": 7, @@ -674,10 +578,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -700,10 +601,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 103, - 108 - ], + "range": [103, 108], "loc": { "start": { "line": 6, @@ -720,10 +618,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -743,10 +638,7 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [ - 103, - 108 - ], + "range": [103, 108], "loc": { "start": { "line": 6, @@ -763,10 +655,7 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [ - 25, - 30 - ], + "range": [25, 30], "loc": { "start": { "line": 2, @@ -787,10 +676,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 33, - 39 - ], + "range": [33, 39], "loc": { "start": { "line": 2, @@ -810,10 +696,7 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [ - 57, - 63 - ], + "range": [57, 63], "loc": { "start": { "line": 3, @@ -833,4 +716,4 @@ } ], "through": [] -} \ No newline at end of file +} diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json index 2d53184a..a09d9d2b 100644 --- a/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$props01-scope-output-svelte5.json @@ -79,19 +79,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json index 7ae51ad2..917b33b3 100644 --- a/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots01-scope-output-svelte5.json @@ -55,19 +55,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json index 7ae51ad2..917b33b3 100644 --- a/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots02-no-slot-scope-output-svelte5.json @@ -55,19 +55,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json index 7ae51ad2..917b33b3 100644 --- a/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots03-named-scope-output-svelte5.json @@ -55,19 +55,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json index 7ae51ad2..917b33b3 100644 --- a/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-$$slots04-named-scope-output-svelte5.json @@ -55,19 +55,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json index 521634fa..9e82fc50 100644 --- a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json @@ -31,19 +31,13 @@ "references": [] }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect.pre", + "name": "$props", "identifiers": [], "defs": [], "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json index 0cbf2b03..bbe430ea 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json @@ -84,7 +84,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json index 521634fa..788b5785 100644 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json @@ -37,7 +37,7 @@ "references": [] }, { - "name": "$effect.pre", + "name": "$effect", "identifiers": [], "defs": [], "references": [] From 81b5cfaf01606c460a8a3c51b01e896bc78eea84 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 22:49:10 +0900 Subject: [PATCH 16/27] fix lint --- .eslintignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintignore b/.eslintignore index 87b3b148..db0e0af6 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,6 +4,8 @@ /node_modules /tests/fixtures/**/*.json /tests/fixtures/**/*.svelte +/tests/fixtures/**/*.js +/tests/fixtures/**/*.ts /explorer/dist /explorer/node_modules /explorer-v2/build From 17f11fd519d02524456808d474c65202917208df Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 23:16:20 +0900 Subject: [PATCH 17/27] remove duplicated --- src/parser/globals.ts | 1 - .../ast/$$slots-scope-output-svelte5.json | 11 +- .../parser/ast/$var-scope-output-svelte5.json | 6 - ...within-component-scope-output-svelte5.json | 6 - .../ast/attr01-scope-output-svelte5.json | 6 - .../ast/await01-scope-output-svelte5.json | 6 - .../ast/await02-scope-output-svelte5.json | 6 - ...rite-less-code01-scope-output-svelte5.json | 6 - ...lass-directive01-scope-output-svelte5.json | 6 - .../ast/comments01-scope-output-svelte5.json | 6 - .../components01-scope-output-svelte5.json | 6 - .../components02-scope-output-svelte5.json | 6 - .../components03-scope-output-svelte5.json | 6 - .../components04-scope-output-svelte5.json | 6 - ...n-with-expr-like-scope-output-svelte5.json | 6 - ...ve-use-with-expr-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../06-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../03-style/01-scope-output-svelte5.json | 6 - .../03-style/02-scope-output-svelte5.json | 6 - .../03-style/03-scope-output-svelte5.json | 6 - .../03-style/04-scope-output-svelte5.json | 6 - .../01-tags/01-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../06-scope-output-svelte5.json | 6 - .../07-scope-output-svelte5.json | 6 - .../08-scope-output-svelte5.json | 6 - .../09-scope-output-svelte5.json | 6 - .../10-scope-output-svelte5.json | 11 +- .../11-scope-output-svelte5.json | 11 +- .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../04-comments/01-scope-output-svelte5.json | 6 - .../04-comments/02-scope-output-svelte5.json | 6 - .../05-hash-if/01-scope-output-svelte5.json | 6 - .../05-hash-if/02-scope-output-svelte5.json | 6 - .../05-hash-if/03-scope-output-svelte5.json | 6 - .../06-hash-each/01-scope-output-svelte5.json | 6 - .../06-hash-each/02-scope-output-svelte5.json | 6 - .../06-hash-each/03-scope-output-svelte5.json | 6 - .../06-hash-each/04-scope-output-svelte5.json | 6 - .../06-hash-each/05-scope-output-svelte5.json | 6 - .../06-hash-each/06-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../08-hash-key/01-scope-output-svelte5.json | 6 - .../08-hash-key/02-scope-output-svelte5.json | 6 - .../08-hash-key/03-scope-output-svelte5.json | 6 - .../09-at-html/01-scope-output-svelte5.json | 6 - .../09-at-html/02-scope-output-svelte5.json | 6 - .../10-at-debug/01-scope-output-svelte5.json | 6 - .../10-at-debug/02-scope-output-svelte5.json | 6 - .../10-at-debug/03-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../06-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../06-scope-output-svelte5.json | 6 - .../07-scope-output-svelte5.json | 6 - .../08-scope-output-svelte5.json | 6 - .../09-scope-output-svelte5.json | 6 - .../10-scope-output-svelte5.json | 6 - .../11-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../04-bind-this/01-scope-output-svelte5.json | 6 - .../04-bind-this/02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../02.1-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../06-scope-output-svelte5.json | 6 - .../07-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../05-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../04-bind-this/01-scope-output-svelte5.json | 6 - .../04-bind-this/02-scope-output-svelte5.json | 6 - .../13-slot/00/01-scope-output-svelte5.json | 6 - .../13-slot/00/02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../02-$$slots/01-scope-output-svelte5.json | 11 +- .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../03-scope-output-svelte5.json | 6 - .../04-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../02-scope-output-svelte5.json | 6 - .../01-scope-output-svelte5.json | 6 - ...ach-with-comment-scope-output-svelte5.json | 6 - ...empty-elements01-scope-output-svelte5.json | 6 - .../hello-world01-scope-output-svelte5.json | 6 - .../hello-world02-scope-output-svelte5.json | 6 - .../hello-world03-scope-output-svelte5.json | 6 - .../hello-world04-scope-output-svelte5.json | 6 - .../hello-world05-scope-output-svelte5.json | 6 - .../html-comments01-scope-output-svelte5.json | 6 - .../dot-in-bind01-scope-output-svelte5.json | 6 - ...nt-plugin-svelte-scope-output-svelte5.json | 6 - .../kit-demo-home-scope-output-svelte5.json | 6 - .../ast/label01-scope-output-svelte5.json | 6 - .../let-directive01-scope-output-svelte5.json | 6 - .../let-directive02-scope-output-svelte5.json | 6 - .../let-directive03-scope-output-svelte5.json | 6 - ...che-with-comment-scope-output-svelte5.json | 6 - ...ing-script-tag01-scope-output-svelte5.json | 6 - .../ast/props01-scope-output-svelte5.json | 6 - .../ast/props02-scope-output-svelte5.json | 6 - .../ast/props03-scope-output-svelte5.json | 6 - .../ast/props04-scope-output-svelte5.json | 6 - .../pug/each/each01-scope-output-svelte5.json | 6 - ...closing-template-scope-output-svelte5.json | 6 - ...th-destructure01-scope-output-svelte5.json | 6 - ...th-destructure02-scope-output-svelte5.json | 6 - ...th-destructure03-scope-output-svelte5.json | 6 - ...th-destructure04-scope-output-svelte5.json | 6 - ...th-destructure05-scope-output-svelte5.json | 6 - ...ive-with-store01-scope-output-svelte5.json | 6 - ...ive-with-store02-scope-output-svelte5.json | 6 - ...ctive-with-var01-scope-output-svelte5.json | 6 - ...ctive-with-var02-scope-output-svelte5.json | 6 - ...ctive-with-var03-scope-output-svelte5.json | 6 - .../parser/ast/sass-scope-output-svelte5.json | 6 - .../script-in-style-scope-output-svelte5.json | 6 - .../ast/script-tag-scope-output-svelte5.json | 6 - ...-closing-style01-scope-output-svelte5.json | 6 - .../store-bindings-scope-output-svelte5.json | 6 - ...tyle-directive01-scope-output-svelte5.json | 6 - ...tyle-directive02-scope-output-svelte5.json | 6 - ...tyle-directive03-scope-output-svelte5.json | 6 - .../style-global01-scope-output-svelte5.json | 6 - .../style-global02-scope-output-svelte5.json | 6 - .../style-in-script-scope-output-svelte5.json | 6 - .../ast/style01-scope-output-svelte5.json | 6 - .../ast/style02-scope-output-svelte5.json | 6 - ...t-with-bind-this-scope-output-svelte5.json | 6 - .../example01-scope-output-svelte5.json | 122 ----------------- .../01-untrack-scope-output-svelte5.json | 100 -------------- .../01-counter-scope-output-svelte5.json | 124 ------------------ ...ing-dependencies-scope-output-svelte5.json | 123 ----------------- ...ing-dependencies-scope-output-svelte5.json | 123 ----------------- ...-component-props-scope-output-svelte5.json | 76 ----------- ...-component-props-scope-output-svelte5.json | 76 ----------- .../06-autoscroll-scope-output-svelte5.json | 123 ----------------- .../runes/01-$state-scope-output-svelte5.json | 76 ----------- .../02-$derived-scope-output-svelte5.json | 100 -------------- .../03-$effect-scope-output-svelte5.json | 124 ------------------ .../04-$effect-pre-scope-output-svelte5.json | 76 ----------- .../runes/05-$props-scope-output-svelte5.json | 76 ----------- .../runes/06-$props-scope-output-svelte5.json | 76 ----------- .../runes/07-$props-scope-output-svelte5.json | 76 ----------- .../08-$props-ts-scope-output-svelte5.json | 70 ---------- ...09-how-to-opt-in-scope-output-svelte5.json | 52 -------- .../01-scope-output-svelte5.json | 76 ----------- .../02-scope-output-svelte5.json | 76 ----------- .../ts-$state01-scope-output-svelte5.json | 93 ------------- ...rly-spacing-test-scope-output-svelte5.json | 6 - .../ast/this-attr01-scope-output-svelte5.json | 6 - .../ast/this-attr02-scope-output-svelte5.json | 6 - .../ast/this-attr03-scope-output-svelte5.json | 6 - .../ast/this-attr04-scope-output-svelte5.json | 6 - .../ast/this-attr05-scope-output-svelte5.json | 6 - ...ailing-comment01-scope-output-svelte5.json | 6 - .../actions-scope-output-svelte5.json | 6 - .../adding-data-scope-output-svelte5.json | 6 - ...eters-to-actions-scope-output-svelte5.json | 6 - ...s-to-transitions-scope-output-svelte5.json | 6 - .../animate-scope-output-svelte5.json | 6 - ...-subscriptions01-scope-output-svelte5.json | 6 - .../await-blocks-scope-output-svelte5.json | 6 - .../tutorial/basics-scope-output-svelte5.json | 6 - .../bind-this-scope-output-svelte5.json | 6 - .../checkbox-inputs-scope-output-svelte5.json | 6 - .../class-shorthand-scope-output-svelte5.json | 6 - .../classes-scope-output-svelte5.json | 6 - ...onent-bindings01-scope-output-svelte5.json | 6 - ...onent-bindings02-scope-output-svelte5.json | 6 - ...mponent-events01-scope-output-svelte5.json | 6 - ...mponent-events02-scope-output-svelte5.json | 6 - .../congratulations-scope-output-svelte5.json | 6 - ...ditable-bindings-scope-output-svelte5.json | 6 - .../context-api01-scope-output-svelte5.json | 6 - .../context-api02-scope-output-svelte5.json | 6 - .../context-api03-scope-output-svelte5.json | 6 - ...ss-transitions01-scope-output-svelte5.json | 6 - ...ss-transitions02-scope-output-svelte5.json | 6 - ...m-js-transitions-scope-output-svelte5.json | 6 - .../custom-stores-scope-output-svelte5.json | 6 - .../debug01-scope-output-svelte5.json | 6 - .../debug02-scope-output-svelte5.json | 6 - ...eclaring-props01-scope-output-svelte5.json | 6 - ...eclaring-props02-scope-output-svelte5.json | 6 - ...default-values01-scope-output-svelte5.json | 6 - ...default-values02-scope-output-svelte5.json | 6 - ...rred-transitions-scope-output-svelte5.json | 6 - .../derived-stores-scope-output-svelte5.json | 6 - .../dimensions-scope-output-svelte5.json | 6 - ...ent-forwarding01-scope-output-svelte5.json | 6 - ...ent-forwarding02-scope-output-svelte5.json | 6 - .../dom-events-scope-output-svelte5.json | 6 - ...namic-attributes-scope-output-svelte5.json | 6 - ...h-block-bindings-scope-output-svelte5.json | 6 - .../each-blocks01-scope-output-svelte5.json | 6 - .../each-blocks02-scope-output-svelte5.json | 6 - .../else-blocks-scope-output-svelte5.json | 6 - ...else-if-blocks01-scope-output-svelte5.json | 6 - ...else-if-blocks02-scope-output-svelte5.json | 6 - ...ent-forwarding01-scope-output-svelte5.json | 6 - ...ent-forwarding02-scope-output-svelte5.json | 6 - ...ent-forwarding03-scope-output-svelte5.json | 6 - ...ent-forwarding04-scope-output-svelte5.json | 6 - .../event-modifiers-scope-output-svelte5.json | 6 - .../group-inputs-scope-output-svelte5.json | 6 - .../html-tags01-scope-output-svelte5.json | 6 - .../html-tags02-scope-output-svelte5.json | 6 - .../if-blocks-scope-output-svelte5.json | 6 - .../in-and-out-scope-output-svelte5.json | 6 - .../inline-handlers-scope-output-svelte5.json | 6 - ...eyed-each-blocks-scope-output-svelte5.json | 6 - ...ocal-transitions-scope-output-svelte5.json | 6 - .../media-elements-scope-output-svelte5.json | 6 - ...module-exports01-scope-output-svelte5.json | 6 - ...module-exports02-scope-output-svelte5.json | 6 - ...-select-bindings-scope-output-svelte5.json | 6 - .../named-slots01-scope-output-svelte5.json | 6 - .../named-slots02-scope-output-svelte5.json | 6 - ...ted-components01-scope-output-svelte5.json | 6 - ...ted-components02-scope-output-svelte5.json | 6 - ...numeric-inputs01-scope-output-svelte5.json | 6 - ...numeric-inputs02-scope-output-svelte5.json | 6 - .../ondestroy-scope-output-svelte5.json | 6 - .../onmount-scope-output-svelte5.json | 6 - ...optional-slots01-scope-output-svelte5.json | 6 - ...optional-slots02-scope-output-svelte5.json | 6 - ...optional-slots03-scope-output-svelte5.json | 16 +-- ...tive-assignments-scope-output-svelte5.json | 6 - ...ive-declarations-scope-output-svelte5.json | 6 - ...ctive-statements-scope-output-svelte5.json | 6 - .../readable-stores-scope-output-svelte5.json | 6 - .../select-bindings-scope-output-svelte5.json | 6 - .../sharing-code01-scope-output-svelte5.json | 6 - .../sharing-code02-scope-output-svelte5.json | 6 - ...slot-fallbacks01-scope-output-svelte5.json | 6 - ...slot-fallbacks02-scope-output-svelte5.json | 6 - .../slot-props01-scope-output-svelte5.json | 6 - .../slot-props02-scope-output-svelte5.json | 6 - .../slot-props03-scope-output-svelte5.json | 6 - .../slots01-scope-output-svelte5.json | 6 - .../slots02-scope-output-svelte5.json | 6 - .../spread-props01-scope-output-svelte5.json | 6 - .../spread-props02-scope-output-svelte5.json | 6 - .../spread-props03-scope-output-svelte5.json | 6 - .../tutorial/spring-scope-output-svelte5.json | 6 - .../styling01-scope-output-svelte5.json | 6 - .../styling02-scope-output-svelte5.json | 6 - .../svelte-body-scope-output-svelte5.json | 6 - ...svelte-component-scope-output-svelte5.json | 6 - .../svelte-document-scope-output-svelte5.json | 6 - .../svelte-element-scope-output-svelte5.json | 6 - .../svelte-fragment-scope-output-svelte5.json | 6 - .../svelte-head-scope-output-svelte5.json | 6 - ...svelte-options01-scope-output-svelte5.json | 6 - ...svelte-options02-scope-output-svelte5.json | 6 - ...svelte-options03-scope-output-svelte5.json | 6 - .../svelte-self01-scope-output-svelte5.json | 6 - .../svelte-self02-scope-output-svelte5.json | 6 - .../svelte-self03-scope-output-svelte5.json | 6 - ...-window-bindings-scope-output-svelte5.json | 6 - .../svelte-window-scope-output-svelte5.json | 6 - .../text-inputs01-scope-output-svelte5.json | 6 - .../text-inputs02-scope-output-svelte5.json | 6 - .../textarea-inputs-scope-output-svelte5.json | 6 - .../tutorial/tick-scope-output-svelte5.json | 6 - ...ransition-events-scope-output-svelte5.json | 6 - .../transition-scope-output-svelte5.json | 6 - .../tweened-scope-output-svelte5.json | 6 - .../tutorial/update-scope-output-svelte5.json | 6 - ...rays-and-objects-scope-output-svelte5.json | 6 - ...ritable-stores01-scope-output-svelte5.json | 6 - ...ritable-stores02-scope-output-svelte5.json | 6 - ...ritable-stores03-scope-output-svelte5.json | 6 - ...ritable-stores04-scope-output-svelte5.json | 6 - ...nown-directive01-scope-output-svelte5.json | 6 - ...write-only-store-scope-output-svelte5.json | 6 - 345 files changed, 6 insertions(+), 3807 deletions(-) delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json diff --git a/src/parser/globals.ts b/src/parser/globals.ts index 8fec55a7..9c3824dd 100644 --- a/src/parser/globals.ts +++ b/src/parser/globals.ts @@ -9,7 +9,6 @@ export const globalsForSvelte5 = [ "$state", "$derived", "$effect", - "$effect", "$props", ] as const; export const globals = SVELTE_VERSION.startsWith("5") diff --git a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json index f1529626..1d1fbe75 100644 --- a/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$$slots-scope-output-svelte5.json @@ -9,10 +9,7 @@ "identifier": { "type": "Identifier", "name": "$$slots", - "range": [ - 5, - 12 - ], + "range": [5, 12], "loc": { "start": { "line": 1, @@ -60,12 +57,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json index 76162ab5..ecd15da3 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/10-scope-output-svelte5.json @@ -15,10 +15,7 @@ "identifier": { "type": "Identifier", "name": "$$props", - "range": [ - 12, - 19 - ], + "range": [12, 19], "loc": { "start": { "line": 1, @@ -60,12 +57,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json index 3cc91343..21617057 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/11-scope-output-svelte5.json @@ -21,10 +21,7 @@ "identifier": { "type": "Identifier", "name": "$$restProps", - "range": [ - 11, - 22 - ], + "range": [11, 22], "loc": { "start": { "line": 1, @@ -60,12 +57,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json index e5c99d8d..f152869a 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/02-$$slots/01-scope-output-svelte5.json @@ -9,10 +9,7 @@ "identifier": { "type": "Identifier", "name": "$$slots", - "range": [ - 61, - 68 - ], + "range": [61, 68], "loc": { "start": { "line": 4, @@ -60,12 +57,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json deleted file mode 100644 index 0b3a61a3..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output-svelte5.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 228, - 234 - ], - "loc": { - "start": { - "line": 12, - "column": 13 - }, - "end": { - "line": 12, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 256, - 262 - ], - "loc": { - "start": { - "line": 13, - "column": 13 - }, - "end": { - "line": 13, - "column": 19 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json deleted file mode 100644 index 9612496d..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/functions/01-untrack-scope-output-svelte5.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$effect", - "range": [ - 73, - 80 - ], - "loc": { - "start": { - "line": 6, - "column": 1 - }, - "end": { - "line": 6, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 61, - 67 - ], - "loc": { - "start": { - "line": 4, - "column": 16 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json deleted file mode 100644 index 8a16c2a5..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/01-counter-scope-output-svelte5.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 23, - 29 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$derived", - "range": [ - 48, - 56 - ], - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$effect", - "range": [ - 70, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json deleted file mode 100644 index 07e4552b..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output-svelte5.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 18, - 24 - ], - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 38, - 44 - ], - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$derived", - "range": [ - 60, - 68 - ], - "loc": { - "start": { - "line": 4, - "column": 11 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json deleted file mode 100644 index f8b99298..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output-svelte5.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 54, - 60 - ], - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 74, - 80 - ], - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 15 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$derived", - "range": [ - 96, - 104 - ], - "loc": { - "start": { - "line": 6, - "column": 11 - }, - "end": { - "line": 6, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json deleted file mode 100644 index 224df193..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/04-simple-component-props-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 30, - 36 - ], - "loc": { - "start": { - "line": 2, - "column": 21 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json deleted file mode 100644 index 3fe10353..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/05-advanced-component-props-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 48, - 54 - ], - "loc": { - "start": { - "line": 2, - "column": 39 - }, - "end": { - "line": 2, - "column": 45 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json deleted file mode 100644 index 178925e8..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/06-autoscroll-scope-output-svelte5.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 55, - 61 - ], - "loc": { - "start": { - "line": 4, - "column": 13 - }, - "end": { - "line": 4, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 87, - 93 - ], - "loc": { - "start": { - "line": 5, - "column": 16 - }, - "end": { - "line": 5, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$effect", - "range": [ - 112, - 119 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json deleted file mode 100644 index d35c8eda..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json deleted file mode 100644 index 5170ff17..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output-svelte5.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$derived", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json deleted file mode 100644 index 66211c07..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/03-$effect-scope-output-svelte5.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$derived", - "range": [ - 47, - 55 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 22 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$effect", - "range": [ - 70, - 77 - ], - "loc": { - "start": { - "line": 5, - "column": 1 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json deleted file mode 100644 index cda877e9..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/04-$effect-pre-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$effect", - "range": [ - 83, - 90 - ], - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 8 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json deleted file mode 100644 index f9e56e32..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/05-$props-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 55, - 61 - ], - "loc": { - "start": { - "line": 2, - "column": 46 - }, - "end": { - "line": 2, - "column": 52 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json deleted file mode 100644 index 7167c010..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/06-$props-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 39, - 45 - ], - "loc": { - "start": { - "line": 2, - "column": 30 - }, - "end": { - "line": 2, - "column": 36 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json deleted file mode 100644 index ea45e122..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/07-$props-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 50, - 56 - ], - "loc": { - "start": { - "line": 2, - "column": 41 - }, - "end": { - "line": 2, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json deleted file mode 100644 index e4776104..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/08-$props-ts-scope-output-svelte5.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$props", - "range": [ - 82, - 88 - ], - "loc": { - "start": { - "line": 3, - "column": 41 - }, - "end": { - "line": 3, - "column": 47 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json deleted file mode 100644 index 788b5785..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output-svelte5.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json deleted file mode 100644 index d35c8eda..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 22, - 28 - ], - "loc": { - "start": { - "line": 2, - "column": 13 - }, - "end": { - "line": 2, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json deleted file mode 100644 index 5e931015..00000000 --- a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output-svelte5.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 51, - 57 - ], - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 20 - } - } - }, - "from": "function", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json deleted file mode 100644 index 8fa82428..00000000 --- a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output-svelte5.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [ - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 33, - 39 - ], - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 20 - } - } - }, - "from": "module", - "init": null, - "resolved": null - }, - { - "identifier": { - "type": "Identifier", - "name": "$state", - "range": [ - 57, - 63 - ], - "loc": { - "start": { - "line": 3, - "column": 13 - }, - "end": { - "line": 3, - "column": 19 - } - } - }, - "from": "module", - "init": null, - "resolved": null - } - ] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json index bbe430ea..89a3a719 100644 --- a/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/optional-slots03-scope-output-svelte5.json @@ -9,10 +9,7 @@ "identifier": { "type": "Identifier", "name": "$$slots", - "range": [ - 758, - 765 - ], + "range": [758, 765], "loc": { "start": { "line": 53, @@ -32,10 +29,7 @@ "identifier": { "type": "Identifier", "name": "$$slots", - "range": [ - 872, - 879 - ], + "range": [872, 879], "loc": { "start": { "line": 58, @@ -83,12 +77,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json index 788b5785..4c810448 100644 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json +++ b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json @@ -36,12 +36,6 @@ "defs": [], "references": [] }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, { "name": "$props", "identifiers": [], From 1affdb308df88f6f6f1ab4c382e27a7f1b56e5b9 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 23:20:24 +0900 Subject: [PATCH 18/27] fix --- .../example01-scope-output.json | 1706 +++++++++++++---- ...02-tracking-dependencies-scope-output.json | 466 ++++- ...-untracking-dependencies-scope-output.json | 546 ++++-- .../docs/runes/01-$state-scope-output.json | 126 +- .../docs/runes/02-$derived-scope-output.json | 266 ++- .../runes/09-how-to-opt-in-scope-output.json | 6 +- .../universal-reactivity/01-scope-output.json | 191 +- .../universal-reactivity/02-scope-output.json | 461 ++++- .../ast/svelte5/ts-$state01-scope-output.json | 187 +- 9 files changed, 3149 insertions(+), 806 deletions(-) diff --git a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json index 45422c2e..7dd00c92 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/fine-grained-reactivity/example01-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -48,7 +51,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -68,7 +74,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -93,13 +102,13 @@ "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -116,7 +125,10 @@ { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -135,7 +147,10 @@ "name": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -152,7 +167,10 @@ "id": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -170,7 +188,10 @@ { "type": "ArrayExpression", "elements": [], - "range": [29, 31], + "range": [ + 29, + 31 + ], "loc": { "start": { "line": 2, @@ -186,7 +207,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -199,7 +223,10 @@ } }, "optional": false, - "range": [22, 32], + "range": [ + 22, + 32 + ], "loc": { "start": { "line": 2, @@ -211,7 +238,10 @@ } } }, - "range": [14, 32], + "range": [ + 14, + 32 + ], "loc": { "start": { "line": 2, @@ -230,7 +260,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -247,7 +280,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -264,7 +300,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [287, 292], + "range": [ + 287, + 292 + ], "loc": { "start": { "line": 15, @@ -281,7 +320,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -298,7 +340,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [299, 304], + "range": [ + 299, + 304 + ], "loc": { "start": { "line": 15, @@ -315,7 +360,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -336,7 +384,10 @@ { "type": "Identifier", "name": "remaining", - "range": [45, 54], + "range": [ + 45, + 54 + ], "loc": { "start": { "line": 4, @@ -355,7 +406,10 @@ "name": { "type": "Identifier", "name": "remaining", - "range": [45, 54], + "range": [ + 45, + 54 + ], "loc": { "start": { "line": 4, @@ -382,7 +436,10 @@ "type": "Literal", "raw": "'recalculating'", "value": "recalculating", - "range": [78, 93], + "range": [ + 78, + 93 + ], "loc": { "start": { "line": 5, @@ -401,7 +458,10 @@ "object": { "type": "Identifier", "name": "console", - "range": [66, 73], + "range": [ + 66, + 73 + ], "loc": { "start": { "line": 5, @@ -417,7 +477,10 @@ "property": { "type": "Identifier", "name": "log", - "range": [74, 77], + "range": [ + 74, + 77 + ], "loc": { "start": { "line": 5, @@ -429,7 +492,10 @@ } } }, - "range": [66, 77], + "range": [ + 66, + 77 + ], "loc": { "start": { "line": 5, @@ -442,7 +508,10 @@ } }, "optional": false, - "range": [66, 94], + "range": [ + 66, + 94 + ], "loc": { "start": { "line": 5, @@ -454,7 +523,10 @@ } } }, - "range": [66, 95], + "range": [ + 66, + 95 + ], "loc": { "start": { "line": 5, @@ -485,7 +557,10 @@ "object": { "type": "Identifier", "name": "todo", - "range": [127, 131], + "range": [ + 127, + 131 + ], "loc": { "start": { "line": 6, @@ -501,7 +576,10 @@ "property": { "type": "Identifier", "name": "done", - "range": [132, 136], + "range": [ + 132, + 136 + ], "loc": { "start": { "line": 6, @@ -513,7 +591,10 @@ } } }, - "range": [127, 136], + "range": [ + 127, + 136 + ], "loc": { "start": { "line": 6, @@ -527,7 +608,10 @@ }, "operator": "!", "prefix": true, - "range": [126, 136], + "range": [ + 126, + 136 + ], "loc": { "start": { "line": 6, @@ -546,7 +630,10 @@ { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -559,7 +646,10 @@ } } ], - "range": [118, 136], + "range": [ + 118, + 136 + ], "loc": { "start": { "line": 6, @@ -578,7 +668,10 @@ "object": { "type": "Identifier", "name": "todos", - "range": [105, 110], + "range": [ + 105, + 110 + ], "loc": { "start": { "line": 6, @@ -594,7 +687,10 @@ "property": { "type": "Identifier", "name": "filter", - "range": [111, 117], + "range": [ + 111, + 117 + ], "loc": { "start": { "line": 6, @@ -606,7 +702,10 @@ } } }, - "range": [105, 117], + "range": [ + 105, + 117 + ], "loc": { "start": { "line": 6, @@ -619,7 +718,10 @@ } }, "optional": false, - "range": [105, 137], + "range": [ + 105, + 137 + ], "loc": { "start": { "line": 6, @@ -635,7 +737,10 @@ "property": { "type": "Identifier", "name": "length", - "range": [138, 144], + "range": [ + 138, + 144 + ], "loc": { "start": { "line": 6, @@ -647,7 +752,10 @@ } } }, - "range": [105, 144], + "range": [ + 105, + 144 + ], "loc": { "start": { "line": 6, @@ -659,7 +767,10 @@ } } }, - "range": [98, 145], + "range": [ + 98, + 145 + ], "loc": { "start": { "line": 6, @@ -672,7 +783,10 @@ } } ], - "range": [62, 148], + "range": [ + 62, + 148 + ], "loc": { "start": { "line": 4, @@ -689,7 +803,10 @@ "id": { "type": "Identifier", "name": "remaining", - "range": [45, 54], + "range": [ + 45, + 54 + ], "loc": { "start": { "line": 4, @@ -705,7 +822,10 @@ { "type": "Identifier", "name": "todos", - "range": [55, 60], + "range": [ + 55, + 60 + ], "loc": { "start": { "line": 4, @@ -718,7 +838,10 @@ } } ], - "range": [36, 148], + "range": [ + 36, + 148 + ], "loc": { "start": { "line": 4, @@ -740,7 +863,10 @@ { "type": "Identifier", "name": "addTodo", - "range": [160, 167], + "range": [ + 160, + 167 + ], "loc": { "start": { "line": 9, @@ -759,7 +885,10 @@ "name": { "type": "Identifier", "name": "addTodo", - "range": [160, 167], + "range": [ + 160, + 167 + ], "loc": { "start": { "line": 9, @@ -783,7 +912,10 @@ "consequent": { "type": "ReturnStatement", "argument": null, - "range": [206, 213], + "range": [ + 206, + 213 + ], "loc": { "start": { "line": 10, @@ -803,7 +935,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [183, 188], + "range": [ + 183, + 188 + ], "loc": { "start": { "line": 10, @@ -819,7 +954,10 @@ "property": { "type": "Identifier", "name": "key", - "range": [189, 192], + "range": [ + 189, + 192 + ], "loc": { "start": { "line": 10, @@ -831,7 +969,10 @@ } } }, - "range": [183, 192], + "range": [ + 183, + 192 + ], "loc": { "start": { "line": 10, @@ -848,7 +989,10 @@ "type": "Literal", "raw": "'Enter'", "value": "Enter", - "range": [197, 204], + "range": [ + 197, + 204 + ], "loc": { "start": { "line": 10, @@ -860,7 +1004,10 @@ } } }, - "range": [183, 204], + "range": [ + 183, + 204 + ], "loc": { "start": { "line": 10, @@ -872,7 +1019,10 @@ } } }, - "range": [179, 213], + "range": [ + 179, + 213 + ], "loc": { "start": { "line": 10, @@ -893,7 +1043,10 @@ "id": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -912,7 +1065,10 @@ "type": "Literal", "raw": "false", "value": false, - "range": [235, 240], + "range": [ + 235, + 240 + ], "loc": { "start": { "line": 12, @@ -928,7 +1084,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -941,7 +1100,10 @@ } }, "optional": false, - "range": [228, 241], + "range": [ + 228, + 241 + ], "loc": { "start": { "line": 12, @@ -953,7 +1115,10 @@ } } }, - "range": [221, 241], + "range": [ + 221, + 241 + ], "loc": { "start": { "line": 12, @@ -966,7 +1131,10 @@ } } ], - "range": [217, 242], + "range": [ + 217, + 242 + ], "loc": { "start": { "line": 12, @@ -987,7 +1155,10 @@ "id": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -1011,7 +1182,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [263, 268], + "range": [ + 263, + 268 + ], "loc": { "start": { "line": 13, @@ -1027,7 +1201,10 @@ "property": { "type": "Identifier", "name": "target", - "range": [269, 275], + "range": [ + 269, + 275 + ], "loc": { "start": { "line": 13, @@ -1039,7 +1216,10 @@ } } }, - "range": [263, 275], + "range": [ + 263, + 275 + ], "loc": { "start": { "line": 13, @@ -1055,7 +1235,10 @@ "property": { "type": "Identifier", "name": "value", - "range": [276, 281], + "range": [ + 276, + 281 + ], "loc": { "start": { "line": 13, @@ -1067,7 +1250,10 @@ } } }, - "range": [263, 281], + "range": [ + 263, + 281 + ], "loc": { "start": { "line": 13, @@ -1083,7 +1269,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -1096,7 +1285,10 @@ } }, "optional": false, - "range": [256, 282], + "range": [ + 256, + 282 + ], "loc": { "start": { "line": 13, @@ -1108,7 +1300,10 @@ } } }, - "range": [249, 282], + "range": [ + 249, + 282 + ], "loc": { "start": { "line": 13, @@ -1121,7 +1316,10 @@ } } ], - "range": [245, 283], + "range": [ + 245, + 283 + ], "loc": { "start": { "line": 13, @@ -1140,7 +1338,10 @@ "left": { "type": "Identifier", "name": "todos", - "range": [287, 292], + "range": [ + 287, + 292 + ], "loc": { "start": { "line": 15, @@ -1161,7 +1362,10 @@ "argument": { "type": "Identifier", "name": "todos", - "range": [299, 304], + "range": [ + 299, + 304 + ], "loc": { "start": { "line": 15, @@ -1173,7 +1377,10 @@ } } }, - "range": [296, 304], + "range": [ + 296, + 304 + ], "loc": { "start": { "line": 15, @@ -1195,7 +1402,10 @@ "key": { "type": "Identifier", "name": "done", - "range": [315, 319], + "range": [ + 315, + 319 + ], "loc": { "start": { "line": 16, @@ -1220,7 +1430,10 @@ "argument": { "type": "Identifier", "name": "done", - "range": [331, 335], + "range": [ + 331, + 335 + ], "loc": { "start": { "line": 16, @@ -1232,7 +1445,10 @@ } } }, - "range": [324, 335], + "range": [ + 324, + 335 + ], "loc": { "start": { "line": 16, @@ -1245,7 +1461,10 @@ } } ], - "range": [322, 337], + "range": [ + 322, + 337 + ], "loc": { "start": { "line": 16, @@ -1261,7 +1480,10 @@ "generator": false, "id": null, "params": [], - "range": [319, 337], + "range": [ + 319, + 337 + ], "loc": { "start": { "line": 16, @@ -1273,7 +1495,10 @@ } } }, - "range": [311, 337], + "range": [ + 311, + 337 + ], "loc": { "start": { "line": 16, @@ -1292,7 +1517,10 @@ "key": { "type": "Identifier", "name": "done", - "range": [346, 350], + "range": [ + 346, + 350 + ], "loc": { "start": { "line": 17, @@ -1319,7 +1547,10 @@ "left": { "type": "Identifier", "name": "done", - "range": [360, 364], + "range": [ + 360, + 364 + ], "loc": { "start": { "line": 17, @@ -1335,7 +1566,10 @@ "right": { "type": "Identifier", "name": "value", - "range": [367, 372], + "range": [ + 367, + 372 + ], "loc": { "start": { "line": 17, @@ -1347,7 +1581,10 @@ } } }, - "range": [360, 372], + "range": [ + 360, + 372 + ], "loc": { "start": { "line": 17, @@ -1359,7 +1596,10 @@ } } }, - "range": [360, 372], + "range": [ + 360, + 372 + ], "loc": { "start": { "line": 17, @@ -1372,7 +1612,10 @@ } } ], - "range": [358, 374], + "range": [ + 358, + 374 + ], "loc": { "start": { "line": 17, @@ -1391,7 +1634,10 @@ { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -1404,7 +1650,10 @@ } } ], - "range": [350, 374], + "range": [ + 350, + 374 + ], "loc": { "start": { "line": 17, @@ -1416,7 +1665,10 @@ } } }, - "range": [342, 374], + "range": [ + 342, + 374 + ], "loc": { "start": { "line": 17, @@ -1435,7 +1687,10 @@ "key": { "type": "Identifier", "name": "text", - "range": [383, 387], + "range": [ + 383, + 387 + ], "loc": { "start": { "line": 18, @@ -1460,7 +1715,10 @@ "argument": { "type": "Identifier", "name": "text", - "range": [399, 403], + "range": [ + 399, + 403 + ], "loc": { "start": { "line": 18, @@ -1472,7 +1730,10 @@ } } }, - "range": [392, 403], + "range": [ + 392, + 403 + ], "loc": { "start": { "line": 18, @@ -1485,7 +1746,10 @@ } } ], - "range": [390, 405], + "range": [ + 390, + 405 + ], "loc": { "start": { "line": 18, @@ -1501,7 +1765,10 @@ "generator": false, "id": null, "params": [], - "range": [387, 405], + "range": [ + 387, + 405 + ], "loc": { "start": { "line": 18, @@ -1513,7 +1780,10 @@ } } }, - "range": [379, 405], + "range": [ + 379, + 405 + ], "loc": { "start": { "line": 18, @@ -1532,7 +1802,10 @@ "key": { "type": "Identifier", "name": "text", - "range": [414, 418], + "range": [ + 414, + 418 + ], "loc": { "start": { "line": 19, @@ -1559,7 +1832,10 @@ "left": { "type": "Identifier", "name": "text", - "range": [428, 432], + "range": [ + 428, + 432 + ], "loc": { "start": { "line": 19, @@ -1575,7 +1851,10 @@ "right": { "type": "Identifier", "name": "value", - "range": [435, 440], + "range": [ + 435, + 440 + ], "loc": { "start": { "line": 19, @@ -1587,7 +1866,10 @@ } } }, - "range": [428, 440], + "range": [ + 428, + 440 + ], "loc": { "start": { "line": 19, @@ -1599,7 +1881,10 @@ } } }, - "range": [428, 440], + "range": [ + 428, + 440 + ], "loc": { "start": { "line": 19, @@ -1612,7 +1897,10 @@ } } ], - "range": [426, 442], + "range": [ + 426, + 442 + ], "loc": { "start": { "line": 19, @@ -1631,7 +1919,10 @@ { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -1644,7 +1935,10 @@ } } ], - "range": [418, 442], + "range": [ + 418, + 442 + ], "loc": { "start": { "line": 19, @@ -1656,7 +1950,10 @@ } } }, - "range": [410, 442], + "range": [ + 410, + 442 + ], "loc": { "start": { "line": 19, @@ -1669,7 +1966,10 @@ } } ], - "range": [306, 446], + "range": [ + 306, + 446 + ], "loc": { "start": { "line": 15, @@ -1682,7 +1982,10 @@ } } ], - "range": [295, 447], + "range": [ + 295, + 447 + ], "loc": { "start": { "line": 15, @@ -1694,7 +1997,10 @@ } } }, - "range": [287, 447], + "range": [ + 287, + 447 + ], "loc": { "start": { "line": 15, @@ -1706,7 +2012,10 @@ } } }, - "range": [287, 448], + "range": [ + 287, + 448 + ], "loc": { "start": { "line": 15, @@ -1731,7 +2040,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [452, 457], + "range": [ + 452, + 457 + ], "loc": { "start": { "line": 22, @@ -1747,7 +2059,10 @@ "property": { "type": "Identifier", "name": "target", - "range": [458, 464], + "range": [ + 458, + 464 + ], "loc": { "start": { "line": 22, @@ -1759,7 +2074,10 @@ } } }, - "range": [452, 464], + "range": [ + 452, + 464 + ], "loc": { "start": { "line": 22, @@ -1775,7 +2093,10 @@ "property": { "type": "Identifier", "name": "value", - "range": [465, 470], + "range": [ + 465, + 470 + ], "loc": { "start": { "line": 22, @@ -1787,7 +2108,10 @@ } } }, - "range": [452, 470], + "range": [ + 452, + 470 + ], "loc": { "start": { "line": 22, @@ -1804,7 +2128,10 @@ "type": "Literal", "raw": "''", "value": "", - "range": [473, 475], + "range": [ + 473, + 475 + ], "loc": { "start": { "line": 22, @@ -1816,7 +2143,10 @@ } } }, - "range": [452, 475], + "range": [ + 452, + 475 + ], "loc": { "start": { "line": 22, @@ -1828,7 +2158,10 @@ } } }, - "range": [452, 476], + "range": [ + 452, + 476 + ], "loc": { "start": { "line": 22, @@ -1841,7 +2174,10 @@ } } ], - "range": [175, 479], + "range": [ + 175, + 479 + ], "loc": { "start": { "line": 9, @@ -1858,7 +2194,10 @@ "id": { "type": "Identifier", "name": "addTodo", - "range": [160, 167], + "range": [ + 160, + 167 + ], "loc": { "start": { "line": 9, @@ -1874,7 +2213,10 @@ { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -1887,7 +2229,10 @@ } } ], - "range": [151, 479], + "range": [ + 151, + 479 + ], "loc": { "start": { "line": 9, @@ -1909,7 +2254,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -1926,7 +2274,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -1943,7 +2294,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -1976,7 +2330,10 @@ { "type": "Identifier", "name": "todos", - "range": [55, 60], + "range": [ + 55, + 60 + ], "loc": { "start": { "line": 4, @@ -1995,7 +2352,10 @@ "name": { "type": "Identifier", "name": "todos", - "range": [55, 60], + "range": [ + 55, + 60 + ], "loc": { "start": { "line": 4, @@ -2022,7 +2382,10 @@ "type": "Literal", "raw": "'recalculating'", "value": "recalculating", - "range": [78, 93], + "range": [ + 78, + 93 + ], "loc": { "start": { "line": 5, @@ -2041,7 +2404,10 @@ "object": { "type": "Identifier", "name": "console", - "range": [66, 73], + "range": [ + 66, + 73 + ], "loc": { "start": { "line": 5, @@ -2057,7 +2423,10 @@ "property": { "type": "Identifier", "name": "log", - "range": [74, 77], + "range": [ + 74, + 77 + ], "loc": { "start": { "line": 5, @@ -2069,7 +2438,10 @@ } } }, - "range": [66, 77], + "range": [ + 66, + 77 + ], "loc": { "start": { "line": 5, @@ -2082,7 +2454,10 @@ } }, "optional": false, - "range": [66, 94], + "range": [ + 66, + 94 + ], "loc": { "start": { "line": 5, @@ -2094,7 +2469,10 @@ } } }, - "range": [66, 95], + "range": [ + 66, + 95 + ], "loc": { "start": { "line": 5, @@ -2125,7 +2503,10 @@ "object": { "type": "Identifier", "name": "todo", - "range": [127, 131], + "range": [ + 127, + 131 + ], "loc": { "start": { "line": 6, @@ -2141,7 +2522,10 @@ "property": { "type": "Identifier", "name": "done", - "range": [132, 136], + "range": [ + 132, + 136 + ], "loc": { "start": { "line": 6, @@ -2153,7 +2537,10 @@ } } }, - "range": [127, 136], + "range": [ + 127, + 136 + ], "loc": { "start": { "line": 6, @@ -2167,7 +2554,10 @@ }, "operator": "!", "prefix": true, - "range": [126, 136], + "range": [ + 126, + 136 + ], "loc": { "start": { "line": 6, @@ -2186,7 +2576,10 @@ { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -2199,7 +2592,10 @@ } } ], - "range": [118, 136], + "range": [ + 118, + 136 + ], "loc": { "start": { "line": 6, @@ -2218,7 +2614,10 @@ "object": { "type": "Identifier", "name": "todos", - "range": [105, 110], + "range": [ + 105, + 110 + ], "loc": { "start": { "line": 6, @@ -2234,7 +2633,10 @@ "property": { "type": "Identifier", "name": "filter", - "range": [111, 117], + "range": [ + 111, + 117 + ], "loc": { "start": { "line": 6, @@ -2246,7 +2648,10 @@ } } }, - "range": [105, 117], + "range": [ + 105, + 117 + ], "loc": { "start": { "line": 6, @@ -2259,7 +2664,10 @@ } }, "optional": false, - "range": [105, 137], + "range": [ + 105, + 137 + ], "loc": { "start": { "line": 6, @@ -2275,7 +2683,10 @@ "property": { "type": "Identifier", "name": "length", - "range": [138, 144], + "range": [ + 138, + 144 + ], "loc": { "start": { "line": 6, @@ -2287,7 +2698,10 @@ } } }, - "range": [105, 144], + "range": [ + 105, + 144 + ], "loc": { "start": { "line": 6, @@ -2299,7 +2713,10 @@ } } }, - "range": [98, 145], + "range": [ + 98, + 145 + ], "loc": { "start": { "line": 6, @@ -2312,7 +2729,10 @@ } } ], - "range": [62, 148], + "range": [ + 62, + 148 + ], "loc": { "start": { "line": 4, @@ -2329,7 +2749,10 @@ "id": { "type": "Identifier", "name": "remaining", - "range": [45, 54], + "range": [ + 45, + 54 + ], "loc": { "start": { "line": 4, @@ -2345,7 +2768,10 @@ { "type": "Identifier", "name": "todos", - "range": [55, 60], + "range": [ + 55, + 60 + ], "loc": { "start": { "line": 4, @@ -2358,7 +2784,10 @@ } } ], - "range": [36, 148], + "range": [ + 36, + 148 + ], "loc": { "start": { "line": 4, @@ -2377,7 +2806,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [105, 110], + "range": [ + 105, + 110 + ], "loc": { "start": { "line": 6, @@ -2394,7 +2826,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [55, 60], + "range": [ + 55, + 60 + ], "loc": { "start": { "line": 4, @@ -2415,7 +2850,10 @@ "identifier": { "type": "Identifier", "name": "console", - "range": [66, 73], + "range": [ + 66, + 73 + ], "loc": { "start": { "line": 5, @@ -2435,7 +2873,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [105, 110], + "range": [ + 105, + 110 + ], "loc": { "start": { "line": 6, @@ -2452,7 +2893,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [55, 60], + "range": [ + 55, + 60 + ], "loc": { "start": { "line": 4, @@ -2476,7 +2920,10 @@ { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -2495,7 +2942,10 @@ "name": { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -2518,7 +2968,10 @@ "object": { "type": "Identifier", "name": "todo", - "range": [127, 131], + "range": [ + 127, + 131 + ], "loc": { "start": { "line": 6, @@ -2534,7 +2987,10 @@ "property": { "type": "Identifier", "name": "done", - "range": [132, 136], + "range": [ + 132, + 136 + ], "loc": { "start": { "line": 6, @@ -2546,7 +3002,10 @@ } } }, - "range": [127, 136], + "range": [ + 127, + 136 + ], "loc": { "start": { "line": 6, @@ -2560,7 +3019,10 @@ }, "operator": "!", "prefix": true, - "range": [126, 136], + "range": [ + 126, + 136 + ], "loc": { "start": { "line": 6, @@ -2579,7 +3041,10 @@ { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -2592,7 +3057,10 @@ } } ], - "range": [118, 136], + "range": [ + 118, + 136 + ], "loc": { "start": { "line": 6, @@ -2611,7 +3079,10 @@ "identifier": { "type": "Identifier", "name": "todo", - "range": [127, 131], + "range": [ + 127, + 131 + ], "loc": { "start": { "line": 6, @@ -2628,7 +3099,10 @@ "resolved": { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -2649,7 +3123,10 @@ "identifier": { "type": "Identifier", "name": "todo", - "range": [127, 131], + "range": [ + 127, + 131 + ], "loc": { "start": { "line": 6, @@ -2666,7 +3143,10 @@ "resolved": { "type": "Identifier", "name": "todo", - "range": [118, 122], + "range": [ + 118, + 122 + ], "loc": { "start": { "line": 6, @@ -2689,7 +3169,10 @@ "identifier": { "type": "Identifier", "name": "console", - "range": [66, 73], + "range": [ + 66, + 73 + ], "loc": { "start": { "line": 5, @@ -2722,7 +3205,10 @@ { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -2741,7 +3227,10 @@ "name": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -2765,7 +3254,10 @@ "consequent": { "type": "ReturnStatement", "argument": null, - "range": [206, 213], + "range": [ + 206, + 213 + ], "loc": { "start": { "line": 10, @@ -2785,7 +3277,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [183, 188], + "range": [ + 183, + 188 + ], "loc": { "start": { "line": 10, @@ -2801,7 +3296,10 @@ "property": { "type": "Identifier", "name": "key", - "range": [189, 192], + "range": [ + 189, + 192 + ], "loc": { "start": { "line": 10, @@ -2813,7 +3311,10 @@ } } }, - "range": [183, 192], + "range": [ + 183, + 192 + ], "loc": { "start": { "line": 10, @@ -2830,7 +3331,10 @@ "type": "Literal", "raw": "'Enter'", "value": "Enter", - "range": [197, 204], + "range": [ + 197, + 204 + ], "loc": { "start": { "line": 10, @@ -2842,7 +3346,10 @@ } } }, - "range": [183, 204], + "range": [ + 183, + 204 + ], "loc": { "start": { "line": 10, @@ -2854,7 +3361,10 @@ } } }, - "range": [179, 213], + "range": [ + 179, + 213 + ], "loc": { "start": { "line": 10, @@ -2875,7 +3385,10 @@ "id": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -2894,7 +3407,10 @@ "type": "Literal", "raw": "false", "value": false, - "range": [235, 240], + "range": [ + 235, + 240 + ], "loc": { "start": { "line": 12, @@ -2910,7 +3426,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -2923,7 +3442,10 @@ } }, "optional": false, - "range": [228, 241], + "range": [ + 228, + 241 + ], "loc": { "start": { "line": 12, @@ -2935,7 +3457,10 @@ } } }, - "range": [221, 241], + "range": [ + 221, + 241 + ], "loc": { "start": { "line": 12, @@ -2948,7 +3473,10 @@ } } ], - "range": [217, 242], + "range": [ + 217, + 242 + ], "loc": { "start": { "line": 12, @@ -2969,7 +3497,10 @@ "id": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -2993,7 +3524,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [263, 268], + "range": [ + 263, + 268 + ], "loc": { "start": { "line": 13, @@ -3009,7 +3543,10 @@ "property": { "type": "Identifier", "name": "target", - "range": [269, 275], + "range": [ + 269, + 275 + ], "loc": { "start": { "line": 13, @@ -3021,7 +3558,10 @@ } } }, - "range": [263, 275], + "range": [ + 263, + 275 + ], "loc": { "start": { "line": 13, @@ -3037,7 +3577,10 @@ "property": { "type": "Identifier", "name": "value", - "range": [276, 281], + "range": [ + 276, + 281 + ], "loc": { "start": { "line": 13, @@ -3049,7 +3592,10 @@ } } }, - "range": [263, 281], + "range": [ + 263, + 281 + ], "loc": { "start": { "line": 13, @@ -3065,7 +3611,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -3078,7 +3627,10 @@ } }, "optional": false, - "range": [256, 282], + "range": [ + 256, + 282 + ], "loc": { "start": { "line": 13, @@ -3090,7 +3642,10 @@ } } }, - "range": [249, 282], + "range": [ + 249, + 282 + ], "loc": { "start": { "line": 13, @@ -3103,7 +3658,10 @@ } } ], - "range": [245, 283], + "range": [ + 245, + 283 + ], "loc": { "start": { "line": 13, @@ -3122,7 +3680,10 @@ "left": { "type": "Identifier", "name": "todos", - "range": [287, 292], + "range": [ + 287, + 292 + ], "loc": { "start": { "line": 15, @@ -3143,7 +3704,10 @@ "argument": { "type": "Identifier", "name": "todos", - "range": [299, 304], + "range": [ + 299, + 304 + ], "loc": { "start": { "line": 15, @@ -3155,7 +3719,10 @@ } } }, - "range": [296, 304], + "range": [ + 296, + 304 + ], "loc": { "start": { "line": 15, @@ -3177,7 +3744,10 @@ "key": { "type": "Identifier", "name": "done", - "range": [315, 319], + "range": [ + 315, + 319 + ], "loc": { "start": { "line": 16, @@ -3202,7 +3772,10 @@ "argument": { "type": "Identifier", "name": "done", - "range": [331, 335], + "range": [ + 331, + 335 + ], "loc": { "start": { "line": 16, @@ -3214,7 +3787,10 @@ } } }, - "range": [324, 335], + "range": [ + 324, + 335 + ], "loc": { "start": { "line": 16, @@ -3227,7 +3803,10 @@ } } ], - "range": [322, 337], + "range": [ + 322, + 337 + ], "loc": { "start": { "line": 16, @@ -3243,7 +3822,10 @@ "generator": false, "id": null, "params": [], - "range": [319, 337], + "range": [ + 319, + 337 + ], "loc": { "start": { "line": 16, @@ -3255,7 +3837,10 @@ } } }, - "range": [311, 337], + "range": [ + 311, + 337 + ], "loc": { "start": { "line": 16, @@ -3274,7 +3859,10 @@ "key": { "type": "Identifier", "name": "done", - "range": [346, 350], + "range": [ + 346, + 350 + ], "loc": { "start": { "line": 17, @@ -3301,7 +3889,10 @@ "left": { "type": "Identifier", "name": "done", - "range": [360, 364], + "range": [ + 360, + 364 + ], "loc": { "start": { "line": 17, @@ -3317,7 +3908,10 @@ "right": { "type": "Identifier", "name": "value", - "range": [367, 372], + "range": [ + 367, + 372 + ], "loc": { "start": { "line": 17, @@ -3329,7 +3923,10 @@ } } }, - "range": [360, 372], + "range": [ + 360, + 372 + ], "loc": { "start": { "line": 17, @@ -3341,7 +3938,10 @@ } } }, - "range": [360, 372], + "range": [ + 360, + 372 + ], "loc": { "start": { "line": 17, @@ -3354,7 +3954,10 @@ } } ], - "range": [358, 374], + "range": [ + 358, + 374 + ], "loc": { "start": { "line": 17, @@ -3373,7 +3976,10 @@ { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -3386,7 +3992,10 @@ } } ], - "range": [350, 374], + "range": [ + 350, + 374 + ], "loc": { "start": { "line": 17, @@ -3398,7 +4007,10 @@ } } }, - "range": [342, 374], + "range": [ + 342, + 374 + ], "loc": { "start": { "line": 17, @@ -3417,7 +4029,10 @@ "key": { "type": "Identifier", "name": "text", - "range": [383, 387], + "range": [ + 383, + 387 + ], "loc": { "start": { "line": 18, @@ -3442,7 +4057,10 @@ "argument": { "type": "Identifier", "name": "text", - "range": [399, 403], + "range": [ + 399, + 403 + ], "loc": { "start": { "line": 18, @@ -3454,7 +4072,10 @@ } } }, - "range": [392, 403], + "range": [ + 392, + 403 + ], "loc": { "start": { "line": 18, @@ -3467,7 +4088,10 @@ } } ], - "range": [390, 405], + "range": [ + 390, + 405 + ], "loc": { "start": { "line": 18, @@ -3483,7 +4107,10 @@ "generator": false, "id": null, "params": [], - "range": [387, 405], + "range": [ + 387, + 405 + ], "loc": { "start": { "line": 18, @@ -3495,7 +4122,10 @@ } } }, - "range": [379, 405], + "range": [ + 379, + 405 + ], "loc": { "start": { "line": 18, @@ -3514,7 +4144,10 @@ "key": { "type": "Identifier", "name": "text", - "range": [414, 418], + "range": [ + 414, + 418 + ], "loc": { "start": { "line": 19, @@ -3541,7 +4174,10 @@ "left": { "type": "Identifier", "name": "text", - "range": [428, 432], + "range": [ + 428, + 432 + ], "loc": { "start": { "line": 19, @@ -3557,7 +4193,10 @@ "right": { "type": "Identifier", "name": "value", - "range": [435, 440], + "range": [ + 435, + 440 + ], "loc": { "start": { "line": 19, @@ -3569,7 +4208,10 @@ } } }, - "range": [428, 440], + "range": [ + 428, + 440 + ], "loc": { "start": { "line": 19, @@ -3581,7 +4223,10 @@ } } }, - "range": [428, 440], + "range": [ + 428, + 440 + ], "loc": { "start": { "line": 19, @@ -3594,7 +4239,10 @@ } } ], - "range": [426, 442], + "range": [ + 426, + 442 + ], "loc": { "start": { "line": 19, @@ -3613,7 +4261,10 @@ { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -3626,7 +4277,10 @@ } } ], - "range": [418, 442], + "range": [ + 418, + 442 + ], "loc": { "start": { "line": 19, @@ -3638,7 +4292,10 @@ } } }, - "range": [410, 442], + "range": [ + 410, + 442 + ], "loc": { "start": { "line": 19, @@ -3651,7 +4308,10 @@ } } ], - "range": [306, 446], + "range": [ + 306, + 446 + ], "loc": { "start": { "line": 15, @@ -3664,7 +4324,10 @@ } } ], - "range": [295, 447], + "range": [ + 295, + 447 + ], "loc": { "start": { "line": 15, @@ -3676,7 +4339,10 @@ } } }, - "range": [287, 447], + "range": [ + 287, + 447 + ], "loc": { "start": { "line": 15, @@ -3688,7 +4354,10 @@ } } }, - "range": [287, 448], + "range": [ + 287, + 448 + ], "loc": { "start": { "line": 15, @@ -3713,7 +4382,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [452, 457], + "range": [ + 452, + 457 + ], "loc": { "start": { "line": 22, @@ -3729,7 +4401,10 @@ "property": { "type": "Identifier", "name": "target", - "range": [458, 464], + "range": [ + 458, + 464 + ], "loc": { "start": { "line": 22, @@ -3741,7 +4416,10 @@ } } }, - "range": [452, 464], + "range": [ + 452, + 464 + ], "loc": { "start": { "line": 22, @@ -3757,7 +4435,10 @@ "property": { "type": "Identifier", "name": "value", - "range": [465, 470], + "range": [ + 465, + 470 + ], "loc": { "start": { "line": 22, @@ -3769,7 +4450,10 @@ } } }, - "range": [452, 470], + "range": [ + 452, + 470 + ], "loc": { "start": { "line": 22, @@ -3786,7 +4470,10 @@ "type": "Literal", "raw": "''", "value": "", - "range": [473, 475], + "range": [ + 473, + 475 + ], "loc": { "start": { "line": 22, @@ -3798,7 +4485,10 @@ } } }, - "range": [452, 475], + "range": [ + 452, + 475 + ], "loc": { "start": { "line": 22, @@ -3810,7 +4500,10 @@ } } }, - "range": [452, 476], + "range": [ + 452, + 476 + ], "loc": { "start": { "line": 22, @@ -3823,7 +4516,10 @@ } } ], - "range": [175, 479], + "range": [ + 175, + 479 + ], "loc": { "start": { "line": 9, @@ -3840,7 +4536,10 @@ "id": { "type": "Identifier", "name": "addTodo", - "range": [160, 167], + "range": [ + 160, + 167 + ], "loc": { "start": { "line": 9, @@ -3856,7 +4555,10 @@ { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -3869,7 +4571,10 @@ } } ], - "range": [151, 479], + "range": [ + 151, + 479 + ], "loc": { "start": { "line": 9, @@ -3888,7 +4593,10 @@ "identifier": { "type": "Identifier", "name": "event", - "range": [183, 188], + "range": [ + 183, + 188 + ], "loc": { "start": { "line": 10, @@ -3905,7 +4613,10 @@ "resolved": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -3922,7 +4633,10 @@ "identifier": { "type": "Identifier", "name": "event", - "range": [263, 268], + "range": [ + 263, + 268 + ], "loc": { "start": { "line": 13, @@ -3939,7 +4653,10 @@ "resolved": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -3956,7 +4673,10 @@ "identifier": { "type": "Identifier", "name": "event", - "range": [452, 457], + "range": [ + 452, + 457 + ], "loc": { "start": { "line": 22, @@ -3973,7 +4693,10 @@ "resolved": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -3994,7 +4717,10 @@ { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4013,7 +4739,10 @@ "name": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4030,7 +4759,10 @@ "id": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4049,7 +4781,10 @@ "type": "Literal", "raw": "false", "value": false, - "range": [235, 240], + "range": [ + 235, + 240 + ], "loc": { "start": { "line": 12, @@ -4065,7 +4800,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -4078,7 +4816,10 @@ } }, "optional": false, - "range": [228, 241], + "range": [ + 228, + 241 + ], "loc": { "start": { "line": 12, @@ -4090,7 +4831,10 @@ } } }, - "range": [221, 241], + "range": [ + 221, + 241 + ], "loc": { "start": { "line": 12, @@ -4109,7 +4853,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4126,7 +4873,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4143,7 +4893,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [331, 335], + "range": [ + 331, + 335 + ], "loc": { "start": { "line": 16, @@ -4160,7 +4913,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4177,7 +4933,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [360, 364], + "range": [ + 360, + 364 + ], "loc": { "start": { "line": 17, @@ -4194,7 +4953,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4215,7 +4977,10 @@ { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4234,7 +4999,10 @@ "name": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4251,7 +5019,10 @@ "id": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4275,7 +5046,10 @@ "object": { "type": "Identifier", "name": "event", - "range": [263, 268], + "range": [ + 263, + 268 + ], "loc": { "start": { "line": 13, @@ -4291,7 +5065,10 @@ "property": { "type": "Identifier", "name": "target", - "range": [269, 275], + "range": [ + 269, + 275 + ], "loc": { "start": { "line": 13, @@ -4303,7 +5080,10 @@ } } }, - "range": [263, 275], + "range": [ + 263, + 275 + ], "loc": { "start": { "line": 13, @@ -4319,7 +5099,10 @@ "property": { "type": "Identifier", "name": "value", - "range": [276, 281], + "range": [ + 276, + 281 + ], "loc": { "start": { "line": 13, @@ -4331,7 +5114,10 @@ } } }, - "range": [263, 281], + "range": [ + 263, + 281 + ], "loc": { "start": { "line": 13, @@ -4347,7 +5133,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -4360,7 +5149,10 @@ } }, "optional": false, - "range": [256, 282], + "range": [ + 256, + 282 + ], "loc": { "start": { "line": 13, @@ -4372,7 +5164,10 @@ } } }, - "range": [249, 282], + "range": [ + 249, + 282 + ], "loc": { "start": { "line": 13, @@ -4391,7 +5186,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4408,7 +5206,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4425,7 +5226,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [399, 403], + "range": [ + 399, + 403 + ], "loc": { "start": { "line": 18, @@ -4442,7 +5246,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4459,7 +5266,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [428, 432], + "range": [ + 428, + 432 + ], "loc": { "start": { "line": 19, @@ -4476,7 +5286,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4497,7 +5310,10 @@ "identifier": { "type": "Identifier", "name": "event", - "range": [183, 188], + "range": [ + 183, + 188 + ], "loc": { "start": { "line": 10, @@ -4514,7 +5330,10 @@ "resolved": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -4531,7 +5350,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4548,7 +5370,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4565,7 +5390,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -4585,7 +5413,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4602,7 +5433,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -4619,7 +5453,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -4639,7 +5476,10 @@ "identifier": { "type": "Identifier", "name": "event", - "range": [263, 268], + "range": [ + 263, + 268 + ], "loc": { "start": { "line": 13, @@ -4656,7 +5496,10 @@ "resolved": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -4673,7 +5516,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [287, 292], + "range": [ + 287, + 292 + ], "loc": { "start": { "line": 15, @@ -4690,7 +5536,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -4707,7 +5556,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [299, 304], + "range": [ + 299, + 304 + ], "loc": { "start": { "line": 15, @@ -4724,7 +5576,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -4741,7 +5596,10 @@ "identifier": { "type": "Identifier", "name": "event", - "range": [452, 457], + "range": [ + 452, + 457 + ], "loc": { "start": { "line": 22, @@ -4758,7 +5616,10 @@ "resolved": { "type": "Identifier", "name": "event", - "range": [168, 173], + "range": [ + 168, + 173 + ], "loc": { "start": { "line": 9, @@ -4788,7 +5649,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [331, 335], + "range": [ + 331, + 335 + ], "loc": { "start": { "line": 16, @@ -4805,7 +5669,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4825,7 +5692,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [331, 335], + "range": [ + 331, + 335 + ], "loc": { "start": { "line": 16, @@ -4842,7 +5712,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -4872,7 +5745,10 @@ { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -4891,7 +5767,10 @@ "name": { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -4916,7 +5795,10 @@ "left": { "type": "Identifier", "name": "done", - "range": [360, 364], + "range": [ + 360, + 364 + ], "loc": { "start": { "line": 17, @@ -4932,7 +5814,10 @@ "right": { "type": "Identifier", "name": "value", - "range": [367, 372], + "range": [ + 367, + 372 + ], "loc": { "start": { "line": 17, @@ -4944,7 +5829,10 @@ } } }, - "range": [360, 372], + "range": [ + 360, + 372 + ], "loc": { "start": { "line": 17, @@ -4956,7 +5844,10 @@ } } }, - "range": [360, 372], + "range": [ + 360, + 372 + ], "loc": { "start": { "line": 17, @@ -4969,7 +5860,10 @@ } } ], - "range": [358, 374], + "range": [ + 358, + 374 + ], "loc": { "start": { "line": 17, @@ -4988,7 +5882,10 @@ { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -5001,7 +5898,10 @@ } } ], - "range": [350, 374], + "range": [ + 350, + 374 + ], "loc": { "start": { "line": 17, @@ -5020,7 +5920,10 @@ "identifier": { "type": "Identifier", "name": "value", - "range": [367, 372], + "range": [ + 367, + 372 + ], "loc": { "start": { "line": 17, @@ -5037,7 +5940,10 @@ "resolved": { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -5058,7 +5964,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [360, 364], + "range": [ + 360, + 364 + ], "loc": { "start": { "line": 17, @@ -5075,7 +5984,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -5092,7 +6004,10 @@ "identifier": { "type": "Identifier", "name": "value", - "range": [367, 372], + "range": [ + 367, + 372 + ], "loc": { "start": { "line": 17, @@ -5109,7 +6024,10 @@ "resolved": { "type": "Identifier", "name": "value", - "range": [351, 356], + "range": [ + 351, + 356 + ], "loc": { "start": { "line": 17, @@ -5129,7 +6047,10 @@ "identifier": { "type": "Identifier", "name": "done", - "range": [360, 364], + "range": [ + 360, + 364 + ], "loc": { "start": { "line": 17, @@ -5146,7 +6067,10 @@ "resolved": { "type": "Identifier", "name": "done", - "range": [221, 225], + "range": [ + 221, + 225 + ], "loc": { "start": { "line": 12, @@ -5176,7 +6100,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [399, 403], + "range": [ + 399, + 403 + ], "loc": { "start": { "line": 18, @@ -5193,7 +6120,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -5213,7 +6143,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [399, 403], + "range": [ + 399, + 403 + ], "loc": { "start": { "line": 18, @@ -5230,7 +6163,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -5260,7 +6196,10 @@ { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -5279,7 +6218,10 @@ "name": { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -5304,7 +6246,10 @@ "left": { "type": "Identifier", "name": "text", - "range": [428, 432], + "range": [ + 428, + 432 + ], "loc": { "start": { "line": 19, @@ -5320,7 +6265,10 @@ "right": { "type": "Identifier", "name": "value", - "range": [435, 440], + "range": [ + 435, + 440 + ], "loc": { "start": { "line": 19, @@ -5332,7 +6280,10 @@ } } }, - "range": [428, 440], + "range": [ + 428, + 440 + ], "loc": { "start": { "line": 19, @@ -5344,7 +6295,10 @@ } } }, - "range": [428, 440], + "range": [ + 428, + 440 + ], "loc": { "start": { "line": 19, @@ -5357,7 +6311,10 @@ } } ], - "range": [426, 442], + "range": [ + 426, + 442 + ], "loc": { "start": { "line": 19, @@ -5376,7 +6333,10 @@ { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -5389,7 +6349,10 @@ } } ], - "range": [418, 442], + "range": [ + 418, + 442 + ], "loc": { "start": { "line": 19, @@ -5408,7 +6371,10 @@ "identifier": { "type": "Identifier", "name": "value", - "range": [435, 440], + "range": [ + 435, + 440 + ], "loc": { "start": { "line": 19, @@ -5425,7 +6391,10 @@ "resolved": { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -5446,7 +6415,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [428, 432], + "range": [ + 428, + 432 + ], "loc": { "start": { "line": 19, @@ -5463,7 +6435,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -5480,7 +6455,10 @@ "identifier": { "type": "Identifier", "name": "value", - "range": [435, 440], + "range": [ + 435, + 440 + ], "loc": { "start": { "line": 19, @@ -5497,7 +6475,10 @@ "resolved": { "type": "Identifier", "name": "value", - "range": [419, 424], + "range": [ + 419, + 424 + ], "loc": { "start": { "line": 19, @@ -5517,7 +6498,10 @@ "identifier": { "type": "Identifier", "name": "text", - "range": [428, 432], + "range": [ + 428, + 432 + ], "loc": { "start": { "line": 19, @@ -5534,7 +6518,10 @@ "resolved": { "type": "Identifier", "name": "text", - "range": [249, 253], + "range": [ + 249, + 253 + ], "loc": { "start": { "line": 13, @@ -5555,7 +6542,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -5575,7 +6565,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -5595,7 +6588,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [287, 292], + "range": [ + 287, + 292 + ], "loc": { "start": { "line": 15, @@ -5612,7 +6608,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -5629,7 +6628,10 @@ "identifier": { "type": "Identifier", "name": "todos", - "range": [299, 304], + "range": [ + 299, + 304 + ], "loc": { "start": { "line": 15, @@ -5646,7 +6648,10 @@ "resolved": { "type": "Identifier", "name": "todos", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -5667,7 +6672,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -5687,7 +6695,10 @@ "identifier": { "type": "Identifier", "name": "console", - "range": [66, 73], + "range": [ + 66, + 73 + ], "loc": { "start": { "line": 5, @@ -5707,7 +6718,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [228, 234], + "range": [ + 228, + 234 + ], "loc": { "start": { "line": 12, @@ -5727,7 +6741,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [256, 262], + "range": [ + 256, + 262 + ], "loc": { "start": { "line": 13, @@ -5751,7 +6768,10 @@ "identifier": { "type": "Identifier", "name": "console", - "range": [66, 73], + "range": [ + 66, + 73 + ], "loc": { "start": { "line": 5, @@ -5768,4 +6788,4 @@ "resolved": null } ] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json index a2b4223d..9e59b1ee 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/02-tracking-dependencies-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [18, 24], + "range": [ + 18, + 24 + ], "loc": { "start": { "line": 2, @@ -48,7 +51,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -75,7 +81,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [60, 68], + "range": [ + 60, + 68 + ], "loc": { "start": { "line": 4, @@ -94,13 +103,13 @@ ] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -117,7 +126,10 @@ { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -136,7 +148,10 @@ "name": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -153,7 +168,10 @@ "id": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -172,7 +190,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [25, 26], + "range": [ + 25, + 26 + ], "loc": { "start": { "line": 2, @@ -188,7 +209,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [18, 24], + "range": [ + 18, + 24 + ], "loc": { "start": { "line": 2, @@ -201,7 +225,10 @@ } }, "optional": false, - "range": [18, 27], + "range": [ + 18, + 27 + ], "loc": { "start": { "line": 2, @@ -213,7 +240,10 @@ } } }, - "range": [14, 27], + "range": [ + 14, + 27 + ], "loc": { "start": { "line": 2, @@ -232,7 +262,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -249,7 +282,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -266,7 +302,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [105, 106], + "range": [ + 105, + 106 + ], "loc": { "start": { "line": 7, @@ -283,7 +322,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -300,7 +342,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [150, 151], + "range": [ + 150, + 151 + ], "loc": { "start": { "line": 11, @@ -317,7 +362,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -334,7 +382,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [214, 215], + "range": [ + 214, + 215 + ], "loc": { "start": { "line": 13, @@ -351,7 +402,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -372,7 +426,10 @@ { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -391,7 +448,10 @@ "name": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -408,7 +468,10 @@ "id": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -427,7 +490,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [45, 46], + "range": [ + 45, + 46 + ], "loc": { "start": { "line": 3, @@ -443,7 +509,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -456,7 +525,10 @@ } }, "optional": false, - "range": [38, 47], + "range": [ + 38, + 47 + ], "loc": { "start": { "line": 3, @@ -468,7 +540,10 @@ } } }, - "range": [34, 47], + "range": [ + 34, + 47 + ], "loc": { "start": { "line": 3, @@ -487,7 +562,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -504,7 +582,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -521,7 +602,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [109, 110], + "range": [ + 109, + 110 + ], "loc": { "start": { "line": 7, @@ -538,7 +622,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -555,7 +642,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [192, 193], + "range": [ + 192, + 193 + ], "loc": { "start": { "line": 12, @@ -572,7 +662,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -589,7 +682,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [220, 221], + "range": [ + 220, + 221 + ], "loc": { "start": { "line": 13, @@ -606,7 +702,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -627,7 +726,10 @@ { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -646,7 +748,10 @@ "name": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -663,7 +768,10 @@ "id": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -684,7 +792,10 @@ "callee": { "type": "Identifier", "name": "add", - "range": [69, 72], + "range": [ + 69, + 72 + ], "loc": { "start": { "line": 4, @@ -697,7 +808,10 @@ } }, "optional": false, - "range": [69, 74], + "range": [ + 69, + 74 + ], "loc": { "start": { "line": 4, @@ -713,7 +827,10 @@ "callee": { "type": "Identifier", "name": "$derived", - "range": [60, 68], + "range": [ + 60, + 68 + ], "loc": { "start": { "line": 4, @@ -726,7 +843,10 @@ } }, "optional": false, - "range": [60, 75], + "range": [ + 60, + 75 + ], "loc": { "start": { "line": 4, @@ -738,7 +858,10 @@ } } }, - "range": [54, 75], + "range": [ + 54, + 75 + ], "loc": { "start": { "line": 4, @@ -757,7 +880,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -774,7 +900,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -791,7 +920,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [226, 229], + "range": [ + 226, + 229 + ], "loc": { "start": { "line": 13, @@ -808,7 +940,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -829,7 +964,10 @@ { "type": "Identifier", "name": "add", - "range": [88, 91], + "range": [ + 88, + 91 + ], "loc": { "start": { "line": 6, @@ -848,7 +986,10 @@ "name": { "type": "Identifier", "name": "add", - "range": [88, 91], + "range": [ + 88, + 91 + ], "loc": { "start": { "line": 6, @@ -873,7 +1014,10 @@ "left": { "type": "Identifier", "name": "a", - "range": [105, 106], + "range": [ + 105, + 106 + ], "loc": { "start": { "line": 7, @@ -889,7 +1033,10 @@ "right": { "type": "Identifier", "name": "b", - "range": [109, 110], + "range": [ + 109, + 110 + ], "loc": { "start": { "line": 7, @@ -901,7 +1048,10 @@ } } }, - "range": [105, 110], + "range": [ + 105, + 110 + ], "loc": { "start": { "line": 7, @@ -913,7 +1063,10 @@ } } }, - "range": [98, 111], + "range": [ + 98, + 111 + ], "loc": { "start": { "line": 7, @@ -926,7 +1079,10 @@ } } ], - "range": [94, 114], + "range": [ + 94, + 114 + ], "loc": { "start": { "line": 6, @@ -943,7 +1099,10 @@ "id": { "type": "Identifier", "name": "add", - "range": [88, 91], + "range": [ + 88, + 91 + ], "loc": { "start": { "line": 6, @@ -956,7 +1115,10 @@ } }, "params": [], - "range": [79, 114], + "range": [ + 79, + 114 + ], "loc": { "start": { "line": 6, @@ -975,7 +1137,10 @@ "identifier": { "type": "Identifier", "name": "add", - "range": [69, 72], + "range": [ + 69, + 72 + ], "loc": { "start": { "line": 4, @@ -992,7 +1157,10 @@ "resolved": { "type": "Identifier", "name": "add", - "range": [88, 91], + "range": [ + 88, + 91 + ], "loc": { "start": { "line": 6, @@ -1013,7 +1181,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1030,7 +1201,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1047,7 +1221,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [18, 24], + "range": [ + 18, + 24 + ], "loc": { "start": { "line": 2, @@ -1067,7 +1244,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1084,7 +1264,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1101,7 +1284,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -1121,7 +1307,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -1138,7 +1327,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -1155,7 +1347,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [60, 68], + "range": [ + 60, + 68 + ], "loc": { "start": { "line": 4, @@ -1175,7 +1370,10 @@ "identifier": { "type": "Identifier", "name": "add", - "range": [69, 72], + "range": [ + 69, + 72 + ], "loc": { "start": { "line": 4, @@ -1192,7 +1390,10 @@ "resolved": { "type": "Identifier", "name": "add", - "range": [88, 91], + "range": [ + 88, + 91 + ], "loc": { "start": { "line": 6, @@ -1209,7 +1410,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [214, 215], + "range": [ + 214, + 215 + ], "loc": { "start": { "line": 13, @@ -1226,7 +1430,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1243,7 +1450,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [220, 221], + "range": [ + 220, + 221 + ], "loc": { "start": { "line": 13, @@ -1260,7 +1470,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1277,7 +1490,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [226, 229], + "range": [ + 226, + 229 + ], "loc": { "start": { "line": 13, @@ -1294,7 +1510,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [54, 57], + "range": [ + 54, + 57 + ], "loc": { "start": { "line": 4, @@ -1324,7 +1543,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [105, 106], + "range": [ + 105, + 106 + ], "loc": { "start": { "line": 7, @@ -1341,7 +1563,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1358,7 +1583,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [109, 110], + "range": [ + 109, + 110 + ], "loc": { "start": { "line": 7, @@ -1375,7 +1603,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1395,7 +1626,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [105, 106], + "range": [ + 105, + 106 + ], "loc": { "start": { "line": 7, @@ -1412,7 +1646,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1429,7 +1666,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [109, 110], + "range": [ + 109, + 110 + ], "loc": { "start": { "line": 7, @@ -1446,7 +1686,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1469,7 +1712,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [150, 151], + "range": [ + 150, + 151 + ], "loc": { "start": { "line": 11, @@ -1486,7 +1732,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1506,7 +1755,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [150, 151], + "range": [ + 150, + 151 + ], "loc": { "start": { "line": 11, @@ -1523,7 +1775,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [14, 15], + "range": [ + 14, + 15 + ], "loc": { "start": { "line": 2, @@ -1546,7 +1801,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [192, 193], + "range": [ + 192, + 193 + ], "loc": { "start": { "line": 12, @@ -1563,7 +1821,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1583,7 +1844,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [192, 193], + "range": [ + 192, + 193 + ], "loc": { "start": { "line": 12, @@ -1600,7 +1864,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [34, 35], + "range": [ + 34, + 35 + ], "loc": { "start": { "line": 3, @@ -1621,7 +1888,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [18, 24], + "range": [ + 18, + 24 + ], "loc": { "start": { "line": 2, @@ -1641,7 +1911,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -1661,7 +1934,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [60, 68], + "range": [ + 60, + 68 + ], "loc": { "start": { "line": 4, @@ -1681,4 +1957,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json index 786f61c9..35f01e12 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/old-vs-new/03-untracking-dependencies-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [54, 60], + "range": [ + 54, + 60 + ], "loc": { "start": { "line": 4, @@ -48,7 +51,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [74, 80], + "range": [ + 74, + 80 + ], "loc": { "start": { "line": 5, @@ -75,7 +81,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [96, 104], + "range": [ + 96, + 104 + ], "loc": { "start": { "line": 6, @@ -94,13 +103,13 @@ ] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -117,7 +126,10 @@ { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -136,7 +148,10 @@ "name": { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -153,7 +168,10 @@ "imported": { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -168,7 +186,10 @@ "local": { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -180,7 +201,10 @@ } } }, - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -199,7 +223,10 @@ "identifier": { "type": "Identifier", "name": "untrack", - "range": [145, 152], + "range": [ + 145, + 152 + ], "loc": { "start": { "line": 9, @@ -216,7 +243,10 @@ "resolved": { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -237,7 +267,10 @@ { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -256,7 +289,10 @@ "name": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -273,7 +309,10 @@ "id": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -292,7 +331,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [61, 62], + "range": [ + 61, + 62 + ], "loc": { "start": { "line": 4, @@ -308,7 +350,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [54, 60], + "range": [ + 54, + 60 + ], "loc": { "start": { "line": 4, @@ -321,7 +366,10 @@ } }, "optional": false, - "range": [54, 63], + "range": [ + 54, + 63 + ], "loc": { "start": { "line": 4, @@ -333,7 +381,10 @@ } } }, - "range": [50, 63], + "range": [ + 50, + 63 + ], "loc": { "start": { "line": 4, @@ -352,7 +403,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -369,7 +423,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -386,7 +443,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [141, 142], + "range": [ + 141, + 142 + ], "loc": { "start": { "line": 9, @@ -403,7 +463,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -420,7 +483,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [201, 202], + "range": [ + 201, + 202 + ], "loc": { "start": { "line": 13, @@ -437,7 +503,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -454,7 +523,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [265, 266], + "range": [ + 265, + 266 + ], "loc": { "start": { "line": 15, @@ -471,7 +543,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -492,7 +567,10 @@ { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -511,7 +589,10 @@ "name": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -528,7 +609,10 @@ "id": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -547,7 +631,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [81, 82], + "range": [ + 81, + 82 + ], "loc": { "start": { "line": 5, @@ -563,7 +650,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [74, 80], + "range": [ + 74, + 80 + ], "loc": { "start": { "line": 5, @@ -576,7 +666,10 @@ } }, "optional": false, - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -588,7 +681,10 @@ } } }, - "range": [70, 83], + "range": [ + 70, + 83 + ], "loc": { "start": { "line": 5, @@ -607,7 +703,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -624,7 +723,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -641,7 +743,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [159, 160], + "range": [ + 159, + 160 + ], "loc": { "start": { "line": 9, @@ -658,7 +763,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -675,7 +783,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [243, 244], + "range": [ + 243, + 244 + ], "loc": { "start": { "line": 14, @@ -692,7 +803,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -709,7 +823,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [271, 272], + "range": [ + 271, + 272 + ], "loc": { "start": { "line": 15, @@ -726,7 +843,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -747,7 +867,10 @@ { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -766,7 +889,10 @@ "name": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -783,7 +909,10 @@ "id": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -804,7 +933,10 @@ "callee": { "type": "Identifier", "name": "add", - "range": [105, 108], + "range": [ + 105, + 108 + ], "loc": { "start": { "line": 6, @@ -817,7 +949,10 @@ } }, "optional": false, - "range": [105, 110], + "range": [ + 105, + 110 + ], "loc": { "start": { "line": 6, @@ -833,7 +968,10 @@ "callee": { "type": "Identifier", "name": "$derived", - "range": [96, 104], + "range": [ + 96, + 104 + ], "loc": { "start": { "line": 6, @@ -846,7 +984,10 @@ } }, "optional": false, - "range": [96, 111], + "range": [ + 96, + 111 + ], "loc": { "start": { "line": 6, @@ -858,7 +999,10 @@ } } }, - "range": [90, 111], + "range": [ + 90, + 111 + ], "loc": { "start": { "line": 6, @@ -877,7 +1021,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -894,7 +1041,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -911,7 +1061,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [277, 280], + "range": [ + 277, + 280 + ], "loc": { "start": { "line": 15, @@ -928,7 +1081,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -949,7 +1105,10 @@ { "type": "Identifier", "name": "add", - "range": [124, 127], + "range": [ + 124, + 127 + ], "loc": { "start": { "line": 8, @@ -968,7 +1127,10 @@ "name": { "type": "Identifier", "name": "add", - "range": [124, 127], + "range": [ + 124, + 127 + ], "loc": { "start": { "line": 8, @@ -993,7 +1155,10 @@ "left": { "type": "Identifier", "name": "a", - "range": [141, 142], + "range": [ + 141, + 142 + ], "loc": { "start": { "line": 9, @@ -1015,7 +1180,10 @@ "body": { "type": "Identifier", "name": "b", - "range": [159, 160], + "range": [ + 159, + 160 + ], "loc": { "start": { "line": 9, @@ -1031,7 +1199,10 @@ "generator": false, "id": null, "params": [], - "range": [153, 160], + "range": [ + 153, + 160 + ], "loc": { "start": { "line": 9, @@ -1047,7 +1218,10 @@ "callee": { "type": "Identifier", "name": "untrack", - "range": [145, 152], + "range": [ + 145, + 152 + ], "loc": { "start": { "line": 9, @@ -1060,7 +1234,10 @@ } }, "optional": false, - "range": [145, 161], + "range": [ + 145, + 161 + ], "loc": { "start": { "line": 9, @@ -1072,7 +1249,10 @@ } } }, - "range": [141, 161], + "range": [ + 141, + 161 + ], "loc": { "start": { "line": 9, @@ -1084,7 +1264,10 @@ } } }, - "range": [134, 162], + "range": [ + 134, + 162 + ], "loc": { "start": { "line": 9, @@ -1097,7 +1280,10 @@ } } ], - "range": [130, 165], + "range": [ + 130, + 165 + ], "loc": { "start": { "line": 8, @@ -1114,7 +1300,10 @@ "id": { "type": "Identifier", "name": "add", - "range": [124, 127], + "range": [ + 124, + 127 + ], "loc": { "start": { "line": 8, @@ -1127,7 +1316,10 @@ } }, "params": [], - "range": [115, 165], + "range": [ + 115, + 165 + ], "loc": { "start": { "line": 8, @@ -1146,7 +1338,10 @@ "identifier": { "type": "Identifier", "name": "add", - "range": [105, 108], + "range": [ + 105, + 108 + ], "loc": { "start": { "line": 6, @@ -1163,7 +1358,10 @@ "resolved": { "type": "Identifier", "name": "add", - "range": [124, 127], + "range": [ + 124, + 127 + ], "loc": { "start": { "line": 8, @@ -1184,7 +1382,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1201,7 +1402,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1218,7 +1422,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [54, 60], + "range": [ + 54, + 60 + ], "loc": { "start": { "line": 4, @@ -1238,7 +1445,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1255,7 +1465,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1272,7 +1485,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [74, 80], + "range": [ + 74, + 80 + ], "loc": { "start": { "line": 5, @@ -1292,7 +1508,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -1309,7 +1528,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -1326,7 +1548,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [96, 104], + "range": [ + 96, + 104 + ], "loc": { "start": { "line": 6, @@ -1346,7 +1571,10 @@ "identifier": { "type": "Identifier", "name": "add", - "range": [105, 108], + "range": [ + 105, + 108 + ], "loc": { "start": { "line": 6, @@ -1363,7 +1591,10 @@ "resolved": { "type": "Identifier", "name": "add", - "range": [124, 127], + "range": [ + 124, + 127 + ], "loc": { "start": { "line": 8, @@ -1380,7 +1611,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [265, 266], + "range": [ + 265, + 266 + ], "loc": { "start": { "line": 15, @@ -1397,7 +1631,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1414,7 +1651,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [271, 272], + "range": [ + 271, + 272 + ], "loc": { "start": { "line": 15, @@ -1431,7 +1671,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1448,7 +1691,10 @@ "identifier": { "type": "Identifier", "name": "sum", - "range": [277, 280], + "range": [ + 277, + 280 + ], "loc": { "start": { "line": 15, @@ -1465,7 +1711,10 @@ "resolved": { "type": "Identifier", "name": "sum", - "range": [90, 93], + "range": [ + 90, + 93 + ], "loc": { "start": { "line": 6, @@ -1495,7 +1744,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [141, 142], + "range": [ + 141, + 142 + ], "loc": { "start": { "line": 9, @@ -1512,7 +1764,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1529,7 +1784,10 @@ "identifier": { "type": "Identifier", "name": "untrack", - "range": [145, 152], + "range": [ + 145, + 152 + ], "loc": { "start": { "line": 9, @@ -1546,7 +1804,10 @@ "resolved": { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -1569,7 +1830,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [159, 160], + "range": [ + 159, + 160 + ], "loc": { "start": { "line": 9, @@ -1586,7 +1850,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1606,7 +1873,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [159, 160], + "range": [ + 159, + 160 + ], "loc": { "start": { "line": 9, @@ -1623,7 +1893,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1644,7 +1917,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [141, 142], + "range": [ + 141, + 142 + ], "loc": { "start": { "line": 9, @@ -1661,7 +1937,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1678,7 +1957,10 @@ "identifier": { "type": "Identifier", "name": "untrack", - "range": [145, 152], + "range": [ + 145, + 152 + ], "loc": { "start": { "line": 9, @@ -1695,7 +1977,10 @@ "resolved": { "type": "Identifier", "name": "untrack", - "range": [19, 26], + "range": [ + 19, + 26 + ], "loc": { "start": { "line": 2, @@ -1712,7 +1997,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [159, 160], + "range": [ + 159, + 160 + ], "loc": { "start": { "line": 9, @@ -1729,7 +2017,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1752,7 +2043,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [201, 202], + "range": [ + 201, + 202 + ], "loc": { "start": { "line": 13, @@ -1769,7 +2063,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1789,7 +2086,10 @@ "identifier": { "type": "Identifier", "name": "a", - "range": [201, 202], + "range": [ + 201, + 202 + ], "loc": { "start": { "line": 13, @@ -1806,7 +2106,10 @@ "resolved": { "type": "Identifier", "name": "a", - "range": [50, 51], + "range": [ + 50, + 51 + ], "loc": { "start": { "line": 4, @@ -1829,7 +2132,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [243, 244], + "range": [ + 243, + 244 + ], "loc": { "start": { "line": 14, @@ -1846,7 +2152,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1866,7 +2175,10 @@ "identifier": { "type": "Identifier", "name": "b", - "range": [243, 244], + "range": [ + 243, + 244 + ], "loc": { "start": { "line": 14, @@ -1883,7 +2195,10 @@ "resolved": { "type": "Identifier", "name": "b", - "range": [70, 71], + "range": [ + 70, + 71 + ], "loc": { "start": { "line": 5, @@ -1904,7 +2219,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [54, 60], + "range": [ + 54, + 60 + ], "loc": { "start": { "line": 4, @@ -1924,7 +2242,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [74, 80], + "range": [ + 74, + 80 + ], "loc": { "start": { "line": 5, @@ -1944,7 +2265,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [96, 104], + "range": [ + 96, + 104 + ], "loc": { "start": { "line": 6, @@ -1964,4 +2288,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json index 39acdf1a..49fb45fa 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/01-$state-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -53,13 +56,13 @@ "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -76,7 +79,10 @@ { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -95,7 +101,10 @@ "name": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -112,7 +121,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -131,7 +143,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [29, 30], + "range": [ + 29, + 30 + ], "loc": { "start": { "line": 2, @@ -147,7 +162,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -160,7 +178,10 @@ } }, "optional": false, - "range": [22, 31], + "range": [ + 22, + 31 + ], "loc": { "start": { "line": 2, @@ -172,7 +193,10 @@ } } }, - "range": [14, 31], + "range": [ + 14, + 31 + ], "loc": { "start": { "line": 2, @@ -191,7 +215,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -208,7 +235,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -225,7 +255,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [68, 73], + "range": [ + 68, + 73 + ], "loc": { "start": { "line": 5, @@ -242,7 +275,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -259,7 +295,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [88, 93], + "range": [ + 88, + 93 + ], "loc": { "start": { "line": 6, @@ -276,7 +315,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -297,7 +339,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -314,7 +359,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -331,7 +379,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -351,7 +402,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [88, 93], + "range": [ + 88, + 93 + ], "loc": { "start": { "line": 6, @@ -368,7 +422,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -391,7 +448,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [68, 73], + "range": [ + 68, + 73 + ], "loc": { "start": { "line": 5, @@ -408,7 +468,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -428,7 +491,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [68, 73], + "range": [ + 68, + 73 + ], "loc": { "start": { "line": 5, @@ -445,7 +511,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -466,7 +535,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -486,4 +558,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json index 38a14c03..d0aede02 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/02-$derived-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -55,7 +58,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [47, 55], + "range": [ + 47, + 55 + ], "loc": { "start": { "line": 3, @@ -74,13 +80,13 @@ ] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -97,7 +103,10 @@ { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -116,7 +125,10 @@ "name": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -133,7 +145,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -152,7 +167,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [29, 30], + "range": [ + 29, + 30 + ], "loc": { "start": { "line": 2, @@ -168,7 +186,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -181,7 +202,10 @@ } }, "optional": false, - "range": [22, 31], + "range": [ + 22, + 31 + ], "loc": { "start": { "line": 2, @@ -193,7 +217,10 @@ } } }, - "range": [14, 31], + "range": [ + 14, + 31 + ], "loc": { "start": { "line": 2, @@ -212,7 +239,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -229,7 +259,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -246,7 +279,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [56, 61], + "range": [ + 56, + 61 + ], "loc": { "start": { "line": 3, @@ -263,7 +299,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -280,7 +319,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -297,7 +339,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -314,7 +359,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [138, 143], + "range": [ + 138, + 143 + ], "loc": { "start": { "line": 10, @@ -331,7 +379,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -352,7 +403,10 @@ { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -371,7 +425,10 @@ "name": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -388,7 +445,10 @@ "id": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -408,7 +468,10 @@ "left": { "type": "Identifier", "name": "count", - "range": [56, 61], + "range": [ + 56, + 61 + ], "loc": { "start": { "line": 3, @@ -425,7 +488,10 @@ "type": "Literal", "raw": "2", "value": 2, - "range": [64, 65], + "range": [ + 64, + 65 + ], "loc": { "start": { "line": 3, @@ -437,7 +503,10 @@ } } }, - "range": [56, 65], + "range": [ + 56, + 65 + ], "loc": { "start": { "line": 3, @@ -453,7 +522,10 @@ "callee": { "type": "Identifier", "name": "$derived", - "range": [47, 55], + "range": [ + 47, + 55 + ], "loc": { "start": { "line": 3, @@ -466,7 +538,10 @@ } }, "optional": false, - "range": [47, 66], + "range": [ + 47, + 66 + ], "loc": { "start": { "line": 3, @@ -478,7 +553,10 @@ } } }, - "range": [38, 66], + "range": [ + 38, + 66 + ], "loc": { "start": { "line": 3, @@ -497,7 +575,10 @@ "identifier": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -514,7 +595,10 @@ "resolved": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -531,7 +615,10 @@ "identifier": { "type": "Identifier", "name": "double", - "range": [115, 121], + "range": [ + 115, + 121 + ], "loc": { "start": { "line": 7, @@ -548,7 +635,10 @@ "resolved": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -565,7 +655,10 @@ "identifier": { "type": "Identifier", "name": "double", - "range": [157, 163], + "range": [ + 157, + 163 + ], "loc": { "start": { "line": 10, @@ -582,7 +675,10 @@ "resolved": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -603,7 +699,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -620,7 +719,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -637,7 +739,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -657,7 +762,10 @@ "identifier": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -674,7 +782,10 @@ "resolved": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -691,7 +802,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [47, 55], + "range": [ + 47, + 55 + ], "loc": { "start": { "line": 3, @@ -711,7 +825,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [56, 61], + "range": [ + 56, + 61 + ], "loc": { "start": { "line": 3, @@ -728,7 +845,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -745,7 +865,10 @@ "identifier": { "type": "Identifier", "name": "double", - "range": [115, 121], + "range": [ + 115, + 121 + ], "loc": { "start": { "line": 7, @@ -762,7 +885,10 @@ "resolved": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -779,7 +905,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [138, 143], + "range": [ + 138, + 143 + ], "loc": { "start": { "line": 10, @@ -796,7 +925,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -813,7 +945,10 @@ "identifier": { "type": "Identifier", "name": "double", - "range": [157, 163], + "range": [ + 157, + 163 + ], "loc": { "start": { "line": 10, @@ -830,7 +965,10 @@ "resolved": { "type": "Identifier", "name": "double", - "range": [38, 44], + "range": [ + 38, + 44 + ], "loc": { "start": { "line": 3, @@ -853,7 +991,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -870,7 +1011,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -890,7 +1034,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -907,7 +1054,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -928,7 +1078,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -948,7 +1101,10 @@ "identifier": { "type": "Identifier", "name": "$derived", - "range": [47, 55], + "range": [ + 47, + 55 + ], "loc": { "start": { "line": 3, @@ -968,4 +1124,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json index 0a76a99d..fbcac79c 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/runes/09-how-to-opt-in-scope-output.json @@ -32,13 +32,13 @@ "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -55,4 +55,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json index 72a6091e..c28d4d8b 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/01-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -53,13 +56,13 @@ "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -76,7 +79,10 @@ { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -95,7 +101,10 @@ "name": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -112,7 +121,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -131,7 +143,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [29, 30], + "range": [ + 29, + 30 + ], "loc": { "start": { "line": 2, @@ -147,7 +162,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -160,7 +178,10 @@ } }, "optional": false, - "range": [22, 31], + "range": [ + 22, + 31 + ], "loc": { "start": { "line": 2, @@ -172,7 +193,10 @@ } } }, - "range": [14, 31], + "range": [ + 14, + 31 + ], "loc": { "start": { "line": 2, @@ -191,7 +215,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -208,7 +235,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -225,7 +255,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [60, 65], + "range": [ + 60, + 65 + ], "loc": { "start": { "line": 5, @@ -242,7 +275,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -259,7 +295,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [126, 131], + "range": [ + 126, + 131 + ], "loc": { "start": { "line": 10, @@ -276,7 +315,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -297,7 +339,10 @@ { "type": "Identifier", "name": "increment", - "range": [44, 53], + "range": [ + 44, + 53 + ], "loc": { "start": { "line": 4, @@ -316,7 +361,10 @@ "name": { "type": "Identifier", "name": "increment", - "range": [44, 53], + "range": [ + 44, + 53 + ], "loc": { "start": { "line": 4, @@ -341,7 +389,10 @@ "left": { "type": "Identifier", "name": "count", - "range": [60, 65], + "range": [ + 60, + 65 + ], "loc": { "start": { "line": 5, @@ -358,7 +409,10 @@ "type": "Literal", "raw": "1", "value": 1, - "range": [69, 70], + "range": [ + 69, + 70 + ], "loc": { "start": { "line": 5, @@ -370,7 +424,10 @@ } } }, - "range": [60, 70], + "range": [ + 60, + 70 + ], "loc": { "start": { "line": 5, @@ -382,7 +439,10 @@ } } }, - "range": [60, 71], + "range": [ + 60, + 71 + ], "loc": { "start": { "line": 5, @@ -395,7 +455,10 @@ } } ], - "range": [56, 74], + "range": [ + 56, + 74 + ], "loc": { "start": { "line": 4, @@ -412,7 +475,10 @@ "id": { "type": "Identifier", "name": "increment", - "range": [44, 53], + "range": [ + 44, + 53 + ], "loc": { "start": { "line": 4, @@ -425,7 +491,10 @@ } }, "params": [], - "range": [35, 74], + "range": [ + 35, + 74 + ], "loc": { "start": { "line": 4, @@ -444,7 +513,10 @@ "identifier": { "type": "Identifier", "name": "increment", - "range": [104, 113], + "range": [ + 104, + 113 + ], "loc": { "start": { "line": 9, @@ -461,7 +533,10 @@ "resolved": { "type": "Identifier", "name": "increment", - "range": [44, 53], + "range": [ + 44, + 53 + ], "loc": { "start": { "line": 4, @@ -482,7 +557,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -499,7 +577,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -516,7 +597,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -536,7 +620,10 @@ "identifier": { "type": "Identifier", "name": "increment", - "range": [104, 113], + "range": [ + 104, + 113 + ], "loc": { "start": { "line": 9, @@ -553,7 +640,10 @@ "resolved": { "type": "Identifier", "name": "increment", - "range": [44, 53], + "range": [ + 44, + 53 + ], "loc": { "start": { "line": 4, @@ -570,7 +660,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [126, 131], + "range": [ + 126, + 131 + ], "loc": { "start": { "line": 10, @@ -587,7 +680,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -617,7 +713,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [60, 65], + "range": [ + 60, + 65 + ], "loc": { "start": { "line": 5, @@ -634,7 +733,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -654,7 +756,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [60, 65], + "range": [ + 60, + 65 + ], "loc": { "start": { "line": 5, @@ -671,7 +776,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [14, 19], + "range": [ + 14, + 19 + ], "loc": { "start": { "line": 2, @@ -692,7 +800,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [22, 28], + "range": [ + 22, + 28 + ], "loc": { "start": { "line": 2, @@ -712,4 +823,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json index 2accb895..f177577d 100644 --- a/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/docs/universal-reactivity/02-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [51, 57], + "range": [ + 51, + 57 + ], "loc": { "start": { "line": 3, @@ -53,13 +56,13 @@ "references": [] }, { - "name": "$props", + "name": "$effect", "identifiers": [], "defs": [], "references": [] }, { - "name": "$effect", + "name": "$props", "identifiers": [], "defs": [], "references": [] @@ -76,7 +79,10 @@ { "type": "Identifier", "name": "createCounter", - "range": [19, 32], + "range": [ + 19, + 32 + ], "loc": { "start": { "line": 2, @@ -95,7 +101,10 @@ "name": { "type": "Identifier", "name": "createCounter", - "range": [19, 32], + "range": [ + 19, + 32 + ], "loc": { "start": { "line": 2, @@ -122,7 +131,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -141,7 +153,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [58, 59], + "range": [ + 58, + 59 + ], "loc": { "start": { "line": 3, @@ -157,7 +172,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [51, 57], + "range": [ + 51, + 57 + ], "loc": { "start": { "line": 3, @@ -170,7 +188,10 @@ } }, "optional": false, - "range": [51, 60], + "range": [ + 51, + 60 + ], "loc": { "start": { "line": 3, @@ -182,7 +203,10 @@ } } }, - "range": [43, 60], + "range": [ + 43, + 60 + ], "loc": { "start": { "line": 3, @@ -195,7 +219,10 @@ } } ], - "range": [39, 61], + "range": [ + 39, + 61 + ], "loc": { "start": { "line": 3, @@ -220,7 +247,10 @@ "left": { "type": "Identifier", "name": "count", - "range": [91, 96], + "range": [ + 91, + 96 + ], "loc": { "start": { "line": 6, @@ -237,7 +267,10 @@ "type": "Literal", "raw": "1", "value": 1, - "range": [100, 101], + "range": [ + 100, + 101 + ], "loc": { "start": { "line": 6, @@ -249,7 +282,10 @@ } } }, - "range": [91, 101], + "range": [ + 91, + 101 + ], "loc": { "start": { "line": 6, @@ -261,7 +297,10 @@ } } }, - "range": [91, 102], + "range": [ + 91, + 102 + ], "loc": { "start": { "line": 6, @@ -274,7 +313,10 @@ } } ], - "range": [86, 106], + "range": [ + 86, + 106 + ], "loc": { "start": { "line": 5, @@ -291,7 +333,10 @@ "id": { "type": "Identifier", "name": "increment", - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -304,7 +349,10 @@ } }, "params": [], - "range": [65, 106], + "range": [ + 65, + 106 + ], "loc": { "start": { "line": 5, @@ -328,7 +376,10 @@ "key": { "type": "Identifier", "name": "count", - "range": [126, 131], + "range": [ + 126, + 131 + ], "loc": { "start": { "line": 10, @@ -353,7 +404,10 @@ "argument": { "type": "Identifier", "name": "count", - "range": [143, 148], + "range": [ + 143, + 148 + ], "loc": { "start": { "line": 10, @@ -365,7 +419,10 @@ } } }, - "range": [136, 148], + "range": [ + 136, + 148 + ], "loc": { "start": { "line": 10, @@ -378,7 +435,10 @@ } } ], - "range": [134, 150], + "range": [ + 134, + 150 + ], "loc": { "start": { "line": 10, @@ -394,7 +454,10 @@ "generator": false, "id": null, "params": [], - "range": [131, 150], + "range": [ + 131, + 150 + ], "loc": { "start": { "line": 10, @@ -406,7 +469,10 @@ } } }, - "range": [122, 150], + "range": [ + 122, + 150 + ], "loc": { "start": { "line": 10, @@ -425,7 +491,10 @@ "key": { "type": "Identifier", "name": "increment", - "range": [155, 164], + "range": [ + 155, + 164 + ], "loc": { "start": { "line": 11, @@ -442,7 +511,10 @@ "value": { "type": "Identifier", "name": "increment", - "range": [155, 164], + "range": [ + 155, + 164 + ], "loc": { "start": { "line": 11, @@ -454,7 +526,10 @@ } } }, - "range": [155, 164], + "range": [ + 155, + 164 + ], "loc": { "start": { "line": 11, @@ -467,7 +542,10 @@ } } ], - "range": [117, 168], + "range": [ + 117, + 168 + ], "loc": { "start": { "line": 9, @@ -479,7 +557,10 @@ } } }, - "range": [110, 169], + "range": [ + 110, + 169 + ], "loc": { "start": { "line": 9, @@ -492,7 +573,10 @@ } } ], - "range": [35, 172], + "range": [ + 35, + 172 + ], "loc": { "start": { "line": 2, @@ -509,7 +593,10 @@ "id": { "type": "Identifier", "name": "createCounter", - "range": [19, 32], + "range": [ + 19, + 32 + ], "loc": { "start": { "line": 2, @@ -522,7 +609,10 @@ } }, "params": [], - "range": [10, 172], + "range": [ + 10, + 172 + ], "loc": { "start": { "line": 2, @@ -541,7 +631,10 @@ "identifier": { "type": "Identifier", "name": "createCounter", - "range": [191, 204], + "range": [ + 191, + 204 + ], "loc": { "start": { "line": 15, @@ -558,7 +651,10 @@ "resolved": { "type": "Identifier", "name": "createCounter", - "range": [19, 32], + "range": [ + 19, + 32 + ], "loc": { "start": { "line": 2, @@ -579,7 +675,10 @@ { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -598,7 +697,10 @@ "name": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -615,7 +717,10 @@ "id": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -633,7 +738,10 @@ "callee": { "type": "Identifier", "name": "createCounter", - "range": [191, 204], + "range": [ + 191, + 204 + ], "loc": { "start": { "line": 15, @@ -646,7 +754,10 @@ } }, "optional": false, - "range": [191, 206], + "range": [ + 191, + 206 + ], "loc": { "start": { "line": 15, @@ -658,7 +769,10 @@ } } }, - "range": [181, 206], + "range": [ + 181, + 206 + ], "loc": { "start": { "line": 15, @@ -677,7 +791,10 @@ "identifier": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -694,7 +811,10 @@ "resolved": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -711,7 +831,10 @@ "identifier": { "type": "Identifier", "name": "counter", - "range": [237, 244], + "range": [ + 237, + 244 + ], "loc": { "start": { "line": 18, @@ -728,7 +851,10 @@ "resolved": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -745,7 +871,10 @@ "identifier": { "type": "Identifier", "name": "counter", - "range": [267, 274], + "range": [ + 267, + 274 + ], "loc": { "start": { "line": 19, @@ -762,7 +891,10 @@ "resolved": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -783,7 +915,10 @@ "identifier": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -800,7 +935,10 @@ "resolved": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -817,7 +955,10 @@ "identifier": { "type": "Identifier", "name": "createCounter", - "range": [191, 204], + "range": [ + 191, + 204 + ], "loc": { "start": { "line": 15, @@ -834,7 +975,10 @@ "resolved": { "type": "Identifier", "name": "createCounter", - "range": [19, 32], + "range": [ + 19, + 32 + ], "loc": { "start": { "line": 2, @@ -851,7 +995,10 @@ "identifier": { "type": "Identifier", "name": "counter", - "range": [237, 244], + "range": [ + 237, + 244 + ], "loc": { "start": { "line": 18, @@ -868,7 +1015,10 @@ "resolved": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -885,7 +1035,10 @@ "identifier": { "type": "Identifier", "name": "counter", - "range": [267, 274], + "range": [ + 267, + 274 + ], "loc": { "start": { "line": 19, @@ -902,7 +1055,10 @@ "resolved": { "type": "Identifier", "name": "counter", - "range": [181, 188], + "range": [ + 181, + 188 + ], "loc": { "start": { "line": 15, @@ -932,7 +1088,10 @@ { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -951,7 +1110,10 @@ "name": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -968,7 +1130,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -987,7 +1152,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [58, 59], + "range": [ + 58, + 59 + ], "loc": { "start": { "line": 3, @@ -1003,7 +1171,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [51, 57], + "range": [ + 51, + 57 + ], "loc": { "start": { "line": 3, @@ -1016,7 +1187,10 @@ } }, "optional": false, - "range": [51, 60], + "range": [ + 51, + 60 + ], "loc": { "start": { "line": 3, @@ -1028,7 +1202,10 @@ } } }, - "range": [43, 60], + "range": [ + 43, + 60 + ], "loc": { "start": { "line": 3, @@ -1047,7 +1224,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1064,7 +1244,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1081,7 +1264,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [91, 96], + "range": [ + 91, + 96 + ], "loc": { "start": { "line": 6, @@ -1098,7 +1284,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1115,7 +1304,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [143, 148], + "range": [ + 143, + 148 + ], "loc": { "start": { "line": 10, @@ -1132,7 +1324,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1153,7 +1348,10 @@ { "type": "Identifier", "name": "increment", - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -1172,7 +1370,10 @@ "name": { "type": "Identifier", "name": "increment", - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -1197,7 +1398,10 @@ "left": { "type": "Identifier", "name": "count", - "range": [91, 96], + "range": [ + 91, + 96 + ], "loc": { "start": { "line": 6, @@ -1214,7 +1418,10 @@ "type": "Literal", "raw": "1", "value": 1, - "range": [100, 101], + "range": [ + 100, + 101 + ], "loc": { "start": { "line": 6, @@ -1226,7 +1433,10 @@ } } }, - "range": [91, 101], + "range": [ + 91, + 101 + ], "loc": { "start": { "line": 6, @@ -1238,7 +1448,10 @@ } } }, - "range": [91, 102], + "range": [ + 91, + 102 + ], "loc": { "start": { "line": 6, @@ -1251,7 +1464,10 @@ } } ], - "range": [86, 106], + "range": [ + 86, + 106 + ], "loc": { "start": { "line": 5, @@ -1268,7 +1484,10 @@ "id": { "type": "Identifier", "name": "increment", - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -1281,7 +1500,10 @@ } }, "params": [], - "range": [65, 106], + "range": [ + 65, + 106 + ], "loc": { "start": { "line": 5, @@ -1300,7 +1522,10 @@ "identifier": { "type": "Identifier", "name": "increment", - "range": [155, 164], + "range": [ + 155, + 164 + ], "loc": { "start": { "line": 11, @@ -1317,7 +1542,10 @@ "resolved": { "type": "Identifier", "name": "increment", - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -1338,7 +1566,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1355,7 +1586,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1372,7 +1606,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [51, 57], + "range": [ + 51, + 57 + ], "loc": { "start": { "line": 3, @@ -1392,7 +1629,10 @@ "identifier": { "type": "Identifier", "name": "increment", - "range": [155, 164], + "range": [ + 155, + 164 + ], "loc": { "start": { "line": 11, @@ -1409,7 +1649,10 @@ "resolved": { "type": "Identifier", "name": "increment", - "range": [74, 83], + "range": [ + 74, + 83 + ], "loc": { "start": { "line": 5, @@ -1439,7 +1682,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [91, 96], + "range": [ + 91, + 96 + ], "loc": { "start": { "line": 6, @@ -1456,7 +1702,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1476,7 +1725,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [91, 96], + "range": [ + 91, + 96 + ], "loc": { "start": { "line": 6, @@ -1493,7 +1745,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1523,7 +1778,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [143, 148], + "range": [ + 143, + 148 + ], "loc": { "start": { "line": 10, @@ -1540,7 +1798,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1560,7 +1821,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [143, 148], + "range": [ + 143, + 148 + ], "loc": { "start": { "line": 10, @@ -1577,7 +1841,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [43, 48], + "range": [ + 43, + 48 + ], "loc": { "start": { "line": 3, @@ -1598,7 +1865,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [51, 57], + "range": [ + 51, + 57 + ], "loc": { "start": { "line": 3, @@ -1622,7 +1892,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [51, 57], + "range": [ + 51, + 57 + ], "loc": { "start": { "line": 3, @@ -1642,4 +1915,4 @@ } ], "through": [] -} +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json index dda12633..0524a95f 100644 --- a/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json +++ b/tests/fixtures/parser/ast/svelte5/ts-$state01-scope-output.json @@ -28,7 +28,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -48,7 +51,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -96,7 +102,10 @@ { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -115,7 +124,10 @@ "name": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -132,7 +144,10 @@ "id": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -151,7 +166,10 @@ "type": "Literal", "raw": "0", "value": 0, - "range": [40, 41], + "range": [ + 40, + 41 + ], "loc": { "start": { "line": 2, @@ -167,7 +185,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -180,7 +201,10 @@ } }, "optional": false, - "range": [33, 42], + "range": [ + 33, + 42 + ], "loc": { "start": { "line": 2, @@ -192,7 +216,10 @@ } } }, - "range": [25, 42], + "range": [ + 25, + 42 + ], "loc": { "start": { "line": 2, @@ -211,7 +238,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -228,7 +258,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -245,7 +278,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -262,7 +298,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -279,7 +318,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [125, 130], + "range": [ + 125, + 130 + ], "loc": { "start": { "line": 7, @@ -296,7 +338,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -317,7 +362,10 @@ { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -336,7 +384,10 @@ "name": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -353,7 +404,10 @@ "id": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -371,7 +425,10 @@ "callee": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -384,7 +441,10 @@ } }, "optional": false, - "range": [57, 65], + "range": [ + 57, + 65 + ], "loc": { "start": { "line": 3, @@ -396,7 +456,10 @@ } } }, - "range": [50, 65], + "range": [ + 50, + 65 + ], "loc": { "start": { "line": 3, @@ -415,7 +478,10 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -432,7 +498,10 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -453,7 +522,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -470,7 +542,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -487,7 +562,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -507,7 +585,10 @@ "identifier": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -524,7 +605,10 @@ "resolved": { "type": "Identifier", "name": "name", - "range": [50, 54], + "range": [ + 50, + 54 + ], "loc": { "start": { "line": 3, @@ -541,7 +625,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -561,7 +648,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [125, 130], + "range": [ + 125, + 130 + ], "loc": { "start": { "line": 7, @@ -578,7 +668,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -601,7 +694,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -618,7 +714,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -638,7 +737,10 @@ "identifier": { "type": "Identifier", "name": "count", - "range": [103, 108], + "range": [ + 103, + 108 + ], "loc": { "start": { "line": 6, @@ -655,7 +757,10 @@ "resolved": { "type": "Identifier", "name": "count", - "range": [25, 30], + "range": [ + 25, + 30 + ], "loc": { "start": { "line": 2, @@ -676,7 +781,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [33, 39], + "range": [ + 33, + 39 + ], "loc": { "start": { "line": 2, @@ -696,7 +804,10 @@ "identifier": { "type": "Identifier", "name": "$state", - "range": [57, 63], + "range": [ + 57, + 63 + ], "loc": { "start": { "line": 3, @@ -716,4 +827,4 @@ } ], "through": [] -} +} \ No newline at end of file From cd492b6aa357d66308851fc2e270260b6d6253de Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 23:37:24 +0900 Subject: [PATCH 19/27] implement json sorter --- tests/src/parser/parser.ts | 3 ++- tests/src/parser/test-utils.ts | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/src/parser/parser.ts b/tests/src/parser/parser.ts index ca6d72b1..5da904be 100644 --- a/tests/src/parser/parser.ts +++ b/tests/src/parser/parser.ts @@ -13,6 +13,7 @@ import { } from "./test-utils"; import type { Comment, SvelteProgram, Token } from "../../../src/ast"; import { sortNodes } from "../../../src/parser/sort"; +import { sortJson } from "./test-utils"; function parse(code: string, filePath: string, config: any) { return parseForESLint(code, generateParserOptions({ filePath }, config)); @@ -61,7 +62,7 @@ describe("Check for AST.", () => { } } - assert.deepStrictEqual(json, output); + assert.deepStrictEqual(sortJson(json), sortJson(output)); }); it("location must be correct.", () => { diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index b9232b93..9a360ec6 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -563,3 +563,32 @@ function normalizeObject(value: any) { }), ); } + +export function sortJson(pJson: any): any { + function tryParse() { + if (Array.isArray(pJson) || typeof pJson === "object") { + return [true, pJson]; + } + try { + const json = JSON.parse(pJson); + return [true, json]; + } catch { + return [false, null]; + } + } + + const [isJson, json] = tryParse(); + if (!isJson) return pJson; + // プロパティの順序をソートする + if (Array.isArray(json)) { + return json.map(sortJson); + } + if (json && typeof json === "object") { + const result: any = {}; + for (const key of Object.keys(json).sort()) { + result[key] = sortJson(json[key]); + } + return result; + } + return json; +} From 8cc981ccb62978e0b9cc5b381a395f782c5fb051 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Wed, 15 Nov 2023 23:49:05 +0900 Subject: [PATCH 20/27] how about now --- .../parser/ast/let-directive04-requirements.json | 5 +++++ tests/src/parser/test-utils.ts | 11 +++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 tests/fixtures/parser/ast/let-directive04-requirements.json diff --git a/tests/fixtures/parser/ast/let-directive04-requirements.json b/tests/fixtures/parser/ast/let-directive04-requirements.json new file mode 100644 index 00000000..a876f6f3 --- /dev/null +++ b/tests/fixtures/parser/ast/let-directive04-requirements.json @@ -0,0 +1,5 @@ +{ + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 9a360ec6..090b86b3 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -565,21 +565,20 @@ function normalizeObject(value: any) { } export function sortJson(pJson: any): any { - function tryParse() { + function tryParse(): { isJson: boolean; json: any | null } { if (Array.isArray(pJson) || typeof pJson === "object") { - return [true, pJson]; + return { isJson: true, json: pJson }; } try { const json = JSON.parse(pJson); - return [true, json]; + return { isJson: true, json }; } catch { - return [false, null]; + return { isJson: false, json: null }; } } - const [isJson, json] = tryParse(); + const { isJson, json } = tryParse(); if (!isJson) return pJson; - // プロパティの順序をソートする if (Array.isArray(json)) { return json.map(sortJson); } From 90ef27a69af02b4cce9199f43595964a36a81243 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Thu, 16 Nov 2023 00:18:42 +0900 Subject: [PATCH 21/27] remove more duplicated json --- ...within-component-scope-output-svelte5.json | 46 --------------- .../ast/attr01-scope-output-svelte5.json | 46 --------------- .../ast/await01-scope-output-svelte5.json | 46 --------------- .../ast/await02-scope-output-svelte5.json | 46 --------------- ...rite-less-code01-scope-output-svelte5.json | 46 --------------- ...lass-directive01-scope-output-svelte5.json | 46 --------------- .../ast/comments01-scope-output-svelte5.json | 46 --------------- .../components01-scope-output-svelte5.json | 46 --------------- .../components02-scope-output-svelte5.json | 46 --------------- .../components03-scope-output-svelte5.json | 46 --------------- .../components04-scope-output-svelte5.json | 46 --------------- ...n-with-expr-like-scope-output-svelte5.json | 46 --------------- ...ve-use-with-expr-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../06-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../03-style/01-scope-output-svelte5.json | 46 --------------- .../03-style/02-scope-output-svelte5.json | 46 --------------- .../03-style/03-scope-output-svelte5.json | 46 --------------- .../03-style/04-scope-output-svelte5.json | 46 --------------- .../01-tags/01-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../06-scope-output-svelte5.json | 46 --------------- .../07-scope-output-svelte5.json | 46 --------------- .../08-scope-output-svelte5.json | 46 --------------- .../09-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../04-comments/01-scope-output-svelte5.json | 46 --------------- .../04-comments/02-scope-output-svelte5.json | 46 --------------- .../05-hash-if/01-scope-output-svelte5.json | 46 --------------- .../05-hash-if/02-scope-output-svelte5.json | 46 --------------- .../05-hash-if/03-scope-output-svelte5.json | 46 --------------- .../06-hash-each/01-scope-output-svelte5.json | 46 --------------- .../06-hash-each/02-scope-output-svelte5.json | 46 --------------- .../06-hash-each/03-scope-output-svelte5.json | 46 --------------- .../06-hash-each/04-scope-output-svelte5.json | 46 --------------- .../06-hash-each/05-scope-output-svelte5.json | 46 --------------- .../06-hash-each/06-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../08-hash-key/01-scope-output-svelte5.json | 46 --------------- .../08-hash-key/02-scope-output-svelte5.json | 46 --------------- .../08-hash-key/03-scope-output-svelte5.json | 46 --------------- .../09-at-html/01-scope-output-svelte5.json | 46 --------------- .../09-at-html/02-scope-output-svelte5.json | 46 --------------- .../10-at-debug/01-scope-output-svelte5.json | 46 --------------- .../10-at-debug/02-scope-output-svelte5.json | 46 --------------- .../10-at-debug/03-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../06-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../06-scope-output-svelte5.json | 46 --------------- .../07-scope-output-svelte5.json | 46 --------------- .../08-scope-output-svelte5.json | 46 --------------- .../09-scope-output-svelte5.json | 46 --------------- .../10-scope-output-svelte5.json | 46 --------------- .../11-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../04-bind-this/01-scope-output-svelte5.json | 46 --------------- .../04-bind-this/02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../02.1-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../06-scope-output-svelte5.json | 46 --------------- .../07-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../05-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../04-bind-this/01-scope-output-svelte5.json | 46 --------------- .../04-bind-this/02-scope-output-svelte5.json | 46 --------------- .../13-slot/00/01-scope-output-svelte5.json | 46 --------------- .../13-slot/00/02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../03-scope-output-svelte5.json | 46 --------------- .../04-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../02-scope-output-svelte5.json | 46 --------------- .../01-scope-output-svelte5.json | 46 --------------- ...ach-with-comment-scope-output-svelte5.json | 46 --------------- ...empty-elements01-scope-output-svelte5.json | 46 --------------- .../hello-world01-scope-output-svelte5.json | 46 --------------- .../hello-world02-scope-output-svelte5.json | 46 --------------- .../hello-world03-scope-output-svelte5.json | 46 --------------- .../hello-world04-scope-output-svelte5.json | 46 --------------- .../hello-world05-scope-output-svelte5.json | 46 --------------- .../html-comments01-scope-output-svelte5.json | 46 --------------- .../dot-in-bind01-scope-output-svelte5.json | 46 --------------- ...nt-plugin-svelte-scope-output-svelte5.json | 46 --------------- .../kit-demo-home-scope-output-svelte5.json | 46 --------------- .../ast/label01-scope-output-svelte5.json | 46 --------------- .../let-directive01-scope-output-svelte5.json | 46 --------------- .../let-directive02-scope-output-svelte5.json | 46 --------------- .../let-directive03-scope-output-svelte5.json | 46 --------------- ...che-with-comment-scope-output-svelte5.json | 46 --------------- ...ing-script-tag01-scope-output-svelte5.json | 46 --------------- .../ast/props01-scope-output-svelte5.json | 46 --------------- .../ast/props02-scope-output-svelte5.json | 46 --------------- .../ast/props03-scope-output-svelte5.json | 46 --------------- .../ast/props04-scope-output-svelte5.json | 46 --------------- .../pug/each/each01-scope-output-svelte5.json | 46 --------------- ...closing-template-scope-output-svelte5.json | 46 --------------- ...th-destructure01-scope-output-svelte5.json | 46 --------------- ...th-destructure02-scope-output-svelte5.json | 46 --------------- ...th-destructure03-scope-output-svelte5.json | 46 --------------- ...th-destructure04-scope-output-svelte5.json | 46 --------------- ...th-destructure05-scope-output-svelte5.json | 46 --------------- ...ive-with-store01-scope-output-svelte5.json | 46 --------------- ...ive-with-store02-scope-output-svelte5.json | 46 --------------- ...ctive-with-var01-scope-output-svelte5.json | 46 --------------- ...ctive-with-var02-scope-output-svelte5.json | 46 --------------- ...ctive-with-var03-scope-output-svelte5.json | 46 --------------- .../parser/ast/sass-scope-output-svelte5.json | 46 --------------- .../script-in-style-scope-output-svelte5.json | 46 --------------- .../ast/script-tag-scope-output-svelte5.json | 46 --------------- ...-closing-style01-scope-output-svelte5.json | 46 --------------- .../store-bindings-scope-output-svelte5.json | 46 --------------- ...tyle-directive01-scope-output-svelte5.json | 46 --------------- ...tyle-directive02-scope-output-svelte5.json | 46 --------------- ...tyle-directive03-scope-output-svelte5.json | 46 --------------- .../style-global01-scope-output-svelte5.json | 46 --------------- .../style-global02-scope-output-svelte5.json | 46 --------------- .../style-in-script-scope-output-svelte5.json | 46 --------------- .../ast/style01-scope-output-svelte5.json | 46 --------------- .../ast/style02-scope-output-svelte5.json | 46 --------------- ...t-with-bind-this-scope-output-svelte5.json | 46 --------------- ...rly-spacing-test-scope-output-svelte5.json | 46 --------------- .../ast/this-attr01-scope-output-svelte5.json | 46 --------------- .../ast/this-attr02-scope-output-svelte5.json | 46 --------------- .../ast/this-attr03-scope-output-svelte5.json | 46 --------------- .../ast/this-attr04-scope-output-svelte5.json | 46 --------------- .../ast/this-attr05-scope-output-svelte5.json | 46 --------------- ...ailing-comment01-scope-output-svelte5.json | 46 --------------- .../actions-scope-output-svelte5.json | 46 --------------- .../adding-data-scope-output-svelte5.json | 46 --------------- ...eters-to-actions-scope-output-svelte5.json | 46 --------------- ...s-to-transitions-scope-output-svelte5.json | 46 --------------- .../animate-scope-output-svelte5.json | 46 --------------- ...-subscriptions01-scope-output-svelte5.json | 46 --------------- .../await-blocks-scope-output-svelte5.json | 46 --------------- .../tutorial/basics-scope-output-svelte5.json | 46 --------------- .../bind-this-scope-output-svelte5.json | 46 --------------- .../checkbox-inputs-scope-output-svelte5.json | 46 --------------- .../class-shorthand-scope-output-svelte5.json | 46 --------------- .../classes-scope-output-svelte5.json | 46 --------------- ...onent-bindings01-scope-output-svelte5.json | 46 --------------- ...onent-bindings02-scope-output-svelte5.json | 46 --------------- ...mponent-events01-scope-output-svelte5.json | 46 --------------- ...mponent-events02-scope-output-svelte5.json | 46 --------------- .../congratulations-scope-output-svelte5.json | 46 --------------- ...ditable-bindings-scope-output-svelte5.json | 46 --------------- .../context-api01-scope-output-svelte5.json | 46 --------------- .../context-api02-scope-output-svelte5.json | 46 --------------- .../context-api03-scope-output-svelte5.json | 46 --------------- ...ss-transitions01-scope-output-svelte5.json | 46 --------------- ...ss-transitions02-scope-output-svelte5.json | 46 --------------- ...m-js-transitions-scope-output-svelte5.json | 46 --------------- .../custom-stores-scope-output-svelte5.json | 46 --------------- .../debug01-scope-output-svelte5.json | 46 --------------- .../debug02-scope-output-svelte5.json | 46 --------------- ...eclaring-props01-scope-output-svelte5.json | 46 --------------- ...eclaring-props02-scope-output-svelte5.json | 46 --------------- ...default-values01-scope-output-svelte5.json | 46 --------------- ...default-values02-scope-output-svelte5.json | 46 --------------- ...rred-transitions-scope-output-svelte5.json | 46 --------------- .../derived-stores-scope-output-svelte5.json | 46 --------------- .../dimensions-scope-output-svelte5.json | 46 --------------- ...ent-forwarding01-scope-output-svelte5.json | 46 --------------- ...ent-forwarding02-scope-output-svelte5.json | 46 --------------- .../dom-events-scope-output-svelte5.json | 46 --------------- ...namic-attributes-scope-output-svelte5.json | 46 --------------- ...h-block-bindings-scope-output-svelte5.json | 46 --------------- .../each-blocks01-scope-output-svelte5.json | 46 --------------- .../each-blocks02-scope-output-svelte5.json | 46 --------------- .../else-blocks-scope-output-svelte5.json | 46 --------------- ...else-if-blocks01-scope-output-svelte5.json | 46 --------------- ...else-if-blocks02-scope-output-svelte5.json | 46 --------------- ...ent-forwarding01-scope-output-svelte5.json | 46 --------------- ...ent-forwarding02-scope-output-svelte5.json | 46 --------------- ...ent-forwarding03-scope-output-svelte5.json | 46 --------------- ...ent-forwarding04-scope-output-svelte5.json | 46 --------------- .../event-modifiers-scope-output-svelte5.json | 46 --------------- .../group-inputs-scope-output-svelte5.json | 46 --------------- .../html-tags01-scope-output-svelte5.json | 46 --------------- .../html-tags02-scope-output-svelte5.json | 46 --------------- .../if-blocks-scope-output-svelte5.json | 46 --------------- .../in-and-out-scope-output-svelte5.json | 46 --------------- .../inline-handlers-scope-output-svelte5.json | 46 --------------- ...eyed-each-blocks-scope-output-svelte5.json | 46 --------------- ...ocal-transitions-scope-output-svelte5.json | 46 --------------- .../media-elements-scope-output-svelte5.json | 46 --------------- ...module-exports01-scope-output-svelte5.json | 46 --------------- ...module-exports02-scope-output-svelte5.json | 46 --------------- ...-select-bindings-scope-output-svelte5.json | 46 --------------- .../named-slots01-scope-output-svelte5.json | 46 --------------- .../named-slots02-scope-output-svelte5.json | 46 --------------- ...ted-components01-scope-output-svelte5.json | 46 --------------- ...ted-components02-scope-output-svelte5.json | 46 --------------- ...numeric-inputs01-scope-output-svelte5.json | 46 --------------- ...numeric-inputs02-scope-output-svelte5.json | 46 --------------- .../ondestroy-scope-output-svelte5.json | 46 --------------- .../onmount-scope-output-svelte5.json | 46 --------------- ...optional-slots01-scope-output-svelte5.json | 46 --------------- ...optional-slots02-scope-output-svelte5.json | 46 --------------- ...tive-assignments-scope-output-svelte5.json | 46 --------------- ...ive-declarations-scope-output-svelte5.json | 46 --------------- ...ctive-statements-scope-output-svelte5.json | 46 --------------- .../readable-stores-scope-output-svelte5.json | 46 --------------- .../select-bindings-scope-output-svelte5.json | 46 --------------- .../sharing-code01-scope-output-svelte5.json | 46 --------------- .../sharing-code02-scope-output-svelte5.json | 46 --------------- ...slot-fallbacks01-scope-output-svelte5.json | 46 --------------- ...slot-fallbacks02-scope-output-svelte5.json | 46 --------------- .../slot-props01-scope-output-svelte5.json | 46 --------------- .../slot-props02-scope-output-svelte5.json | 46 --------------- .../slot-props03-scope-output-svelte5.json | 46 --------------- .../slots01-scope-output-svelte5.json | 46 --------------- .../slots02-scope-output-svelte5.json | 46 --------------- .../spread-props01-scope-output-svelte5.json | 46 --------------- .../spread-props02-scope-output-svelte5.json | 46 --------------- .../spread-props03-scope-output-svelte5.json | 46 --------------- .../tutorial/spring-scope-output-svelte5.json | 46 --------------- .../styling01-scope-output-svelte5.json | 46 --------------- .../styling02-scope-output-svelte5.json | 46 --------------- .../svelte-body-scope-output-svelte5.json | 46 --------------- ...svelte-component-scope-output-svelte5.json | 46 --------------- .../svelte-document-scope-output-svelte5.json | 46 --------------- .../svelte-element-scope-output-svelte5.json | 46 --------------- .../svelte-fragment-scope-output-svelte5.json | 46 --------------- .../svelte-head-scope-output-svelte5.json | 46 --------------- ...svelte-options01-scope-output-svelte5.json | 46 --------------- ...svelte-options02-scope-output-svelte5.json | 46 --------------- ...svelte-options03-scope-output-svelte5.json | 46 --------------- .../svelte-self01-scope-output-svelte5.json | 46 --------------- .../svelte-self02-scope-output-svelte5.json | 46 --------------- .../svelte-self03-scope-output-svelte5.json | 46 --------------- ...-window-bindings-scope-output-svelte5.json | 46 --------------- .../svelte-window-scope-output-svelte5.json | 46 --------------- .../text-inputs01-scope-output-svelte5.json | 46 --------------- .../text-inputs02-scope-output-svelte5.json | 46 --------------- .../textarea-inputs-scope-output-svelte5.json | 46 --------------- .../tutorial/tick-scope-output-svelte5.json | 46 --------------- ...ransition-events-scope-output-svelte5.json | 46 --------------- .../transition-scope-output-svelte5.json | 46 --------------- .../tweened-scope-output-svelte5.json | 46 --------------- .../tutorial/update-scope-output-svelte5.json | 46 --------------- ...rays-and-objects-scope-output-svelte5.json | 46 --------------- ...ritable-stores01-scope-output-svelte5.json | 46 --------------- ...ritable-stores02-scope-output-svelte5.json | 46 --------------- ...ritable-stores03-scope-output-svelte5.json | 46 --------------- ...ritable-stores04-scope-output-svelte5.json | 46 --------------- ...nown-directive01-scope-output-svelte5.json | 46 --------------- ...write-only-store-scope-output-svelte5.json | 46 --------------- tests/src/parser/test-utils.ts | 59 +++++++++++++++++-- 315 files changed, 54 insertions(+), 14449 deletions(-) delete mode 100644 tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/attr01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/await01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/await02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/comments01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/components01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/components02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/components03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/components04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/label01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/props01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/props02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/props03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/props04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/sass-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/style02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json diff --git a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/at-const01-within-component-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/attr01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json b/tests/fixtures/parser/ast/await01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/await01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json b/tests/fixtures/parser/ast/await02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/await02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/blog/write-less-code01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/class-directive01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/comments01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/components01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/components01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/components02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/components02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json b/tests/fixtures/parser/ast/components03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/components03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json b/tests/fixtures/parser/ast/components04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/components04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/directive-on-with-expr-like-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json b/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/directive-use-with-expr-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/01-export-creates-a-component-prop/06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/02-assignments-are-reactive/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/02-script-context-module/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/03-style/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/01-tags/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/07-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/08-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/02-attributes-and-props/09-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/03-text-expressions/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/04-comments/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/05-hash-if/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/06-hash-each/06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/07-hash-await/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/08-hash-key/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/09-at-html/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/10-at-debug/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/10.1-at-const/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/01-on-eventname/06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/07-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/08-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/09-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/10-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/02-bind-property/11-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/03-bind-group/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/04-bind-this/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05-class-name/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/02.1-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/05.1-style-property/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/06-use-action/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/07-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/08-in-fn-out-fn/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/09-animate-fn/05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/01-on-eventname/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/02-style-props/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/03-bind-property/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/12-component-directives/04-bind-this/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/00/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/01-slot-name-name/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/13-slot/03-slot-let-name-value/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/14-svelte-self/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_1-svelte-component/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/15_2-svelte-element/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_1-svelte-window/04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/16_2-svelte-document/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/17-svelte-body/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/18-svelte-head/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/20-svelte-fragment/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/each-with-comment-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json b/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/empty-elements01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/hello/hello-world01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/hello/hello-world02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/hello/hello-world03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/hello/hello-world04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json b/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/hello/hello-world05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json b/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/html-comments01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/illegal/dot-in-bind01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/issue327-eslint-plugin-svelte-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json b/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/kit-demo-home-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json b/tests/fixtures/parser/ast/label01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/label01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/let-directive01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/let-directive02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/let-directive03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json b/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/mustache-with-comment-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json b/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/nesting-script-tag01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/props01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/props01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/props02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/props02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/props03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/props03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json b/tests/fixtures/parser/ast/props04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/props04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/pug/each/each01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json b/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/pug/each/self-closing-template-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-declarations-with-destructure05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-with-store01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-with-store02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-with-var01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-with-var02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/reactive-with-var03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json b/tests/fixtures/parser/ast/sass-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/sass-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/script-in-style-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json b/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/script-tag-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/self-closing-style01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/store-bindings-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style-directive01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style-directive02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style-directive03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style-global01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style-global02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json b/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style-in-script-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json b/tests/fixtures/parser/ast/style01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json b/tests/fixtures/parser/ast/style02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/style02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/svelte-element-with-bind-this-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/template-curly-spacing-test-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/this-attr01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/this-attr02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/this-attr03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/this-attr04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json b/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/this-attr05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json b/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/trailing-comment01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/actions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/adding-data-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-actions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/adding-parameters-to-transitions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/animate-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/auto-subscriptions01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/await-blocks-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/basics-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/bind-this-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/checkbox-inputs-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/class-shorthand-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/classes-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/component-bindings01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/component-bindings02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/component-events01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/component-events02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/congratulations-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/contenteditable-bindings-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/context-api01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/context-api02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/context-api03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/custom-css-transitions02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/custom-js-transitions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/custom-stores-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/debug01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/debug02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/declaring-props01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/declaring-props02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/default-values01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/default-values02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/deferred-transitions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/derived-stores-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/dimensions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/dom-event-forwarding02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/dom-events-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/dynamic-attributes-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/each-block-bindings-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/each-blocks01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/each-blocks02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/else-blocks-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/else-if-blocks02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/event-forwarding04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/event-modifiers-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/group-inputs-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/html-tags01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/html-tags02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/if-blocks-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/in-and-out-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/inline-handlers-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/keyed-each-blocks-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/local-transitions-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/media-elements-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/module-exports01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/module-exports02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/multiple-select-bindings-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/named-slots01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/named-slots02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/nested-components01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/nested-components02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/numeric-inputs02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/ondestroy-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/onmount-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/optional-slots01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/optional-slots02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/reactive-assignments-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/reactive-declarations-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/reactive-statements-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/readable-stores-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/select-bindings-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/sharing-code01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/sharing-code02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slot-fallbacks02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slot-props01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slot-props02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slot-props03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slots01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/slots02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/spread-props01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/spread-props02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/spread-props03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/spring-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/styling01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/styling02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-body-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-component-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-document-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-element-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-fragment-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-head-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-options01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-options02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-options03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-self01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-self02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-self03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-bindings-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/svelte-window-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/text-inputs01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/text-inputs02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/textarea-inputs-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/tick-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/transition-events-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/transition-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/tweened-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/update-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/updating-arrays-and-objects-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/writable-stores01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/writable-stores02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/writable-stores03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json b/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/tutorial/writable-stores04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/unknown-directive01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json b/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/unused-write-only-store-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 090b86b3..89425f23 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -21,6 +21,52 @@ const BASIC_PARSER_OPTIONS: Linter.ParserOptions = { project: require.resolve("../../fixtures/tsconfig.test.json"), extraFileExtensions: [".svelte"], }; + +const SVELTE5_SCOPE_VARIABLES_BASE = [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } +] + export function generateParserOptions( ...options: Linter.ParserOptions[] ): Linter.ParserOptions { @@ -47,25 +93,28 @@ export function* listupFixtures(dir?: string): Iterable<{ yield* listupFixturesImpl(dir || AST_FIXTURE_ROOT); } -function getScopeFile(inputFileName: string) { +function getScopeFile(inputFileName: string, isSvelte5Only: boolean) { const scopeFileName = inputFileName.replace( /input\.svelte$/u, "scope-output.json", ); if (!fs.existsSync(scopeFileName)) return null; const scopeFile = fs.readFileSync(scopeFileName, "utf8"); - if (!SVELTE_VERSION.startsWith("5")) { + if (!SVELTE_VERSION.startsWith("5") || isSvelte5Only) { return scopeFile; } + const scopeFileJson = JSON.parse(scopeFile); const scopeFileNameSvelte5 = inputFileName.replace( /input\.svelte$/u, "scope-output-svelte5.json", ); - if (!fs.existsSync(scopeFileNameSvelte5)) return scopeFile; + if (!fs.existsSync(scopeFileNameSvelte5)) { + scopeFileJson["variables"] = SVELTE5_SCOPE_VARIABLES_BASE; + return JSON.stringify(scopeFileJson, null, 2); + } const scopeFileSvelte5 = fs.readFileSync(scopeFileNameSvelte5, "utf8"); - const scopeFileJson = JSON.parse(scopeFile); const scopeFileSvelte5Json = JSON.parse(scopeFileSvelte5); for (const key of Object.keys(scopeFileJson)) { @@ -141,7 +190,7 @@ function* listupFixturesImpl(dir: string): Iterable<{ typeFileName: fs.existsSync(typeFileName) ? typeFileName : null, config, requirements, - getScopeFile: () => getScopeFile(inputFileName), + getScopeFile: () => getScopeFile(inputFileName, isSvelte5Only), getRuleOutputFileName: (ruleName) => { return inputFileName.replace( /input\.svelte$/u, From 2a2f3321fe767de82353b70c328dfae5924be8a4 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Thu, 16 Nov 2023 00:22:54 +0900 Subject: [PATCH 22/27] more --- .../ast/await04-scope-output-svelte5.json | 46 ------------- .../05-ts-scope-output-svelte5.json | 46 ------------- .../ast/i18n-test-scope-output-svelte5.json | 46 ------------- ...nt-plugin-svelte-scope-output-svelte5.json | 46 ------------- ...nt-plugin-svelte-scope-output-svelte5.json | 46 ------------- .../let-directive04-scope-output-svelte5.json | 46 ------------- ...ve-with-var04-ts-scope-output-svelte5.json | 46 ------------- ...it-non-promise01-scope-output-svelte5.json | 46 ------------- .../ast/ts-each01-scope-output-svelte5.json | 46 ------------- .../ast/ts-event01-scope-output-svelte5.json | 46 ------------- .../ast/ts-event02-scope-output-svelte5.json | 46 ------------- .../ast/ts-event03-scope-output-svelte5.json | 46 ------------- .../ast/ts-event04-scope-output-svelte5.json | 46 ------------- .../ast/ts-event05-scope-output-svelte5.json | 46 ------------- .../ast/ts-event06-scope-output-svelte5.json | 46 ------------- .../ast/ts-issue226-scope-output-svelte5.json | 46 ------------- .../ts-let/ts-let01-scope-output-svelte5.json | 46 ------------- .../ast/ts-newline-scope-output-svelte5.json | 46 ------------- ...s-not-reactive01-scope-output-svelte5.json | 46 ------------- .../ts-promise01-scope-output-svelte5.json | 46 ------------- .../ts-promise02-scope-output-svelte5.json | 46 ------------- .../ts-reactive01-scope-output-svelte5.json | 46 ------------- .../ts-reactive02-scope-output-svelte5.json | 46 ------------- .../ts-reactive03-scope-output-svelte5.json | 46 ------------- .../ts-reactive04-scope-output-svelte5.json | 46 ------------- .../ts-reactive05-scope-output-svelte5.json | 46 ------------- .../ts-reactive06-scope-output-svelte5.json | 46 ------------- ...ts-scope-issue01-scope-output-svelte5.json | 46 ------------- ...shorthand-attr01-scope-output-svelte5.json | 46 ------------- .../ast/ts-store01-scope-output-svelte5.json | 46 ------------- .../ast/ts-store02-scope-output-svelte5.json | 46 ------------- .../ast/ts-store03-scope-output-svelte5.json | 46 ------------- .../ast/ts-use01-scope-output-svelte5.json | 46 ------------- tests/src/parser/test-utils.ts | 64 +++++++++---------- 34 files changed, 32 insertions(+), 1550 deletions(-) delete mode 100644 tests/fixtures/parser/ast/await04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json diff --git a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json b/tests/fixtures/parser/ast/await04-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/await04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/11-element-directives/07-transition-fn/05-ts-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json b/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/i18n-test-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/issue325-eslint-plugin-svelte-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json b/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/issue338-eslint-plugin-svelte-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/let-directive04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json b/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/reactive-with-var04-ts-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-await-non-promise01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-each01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-event01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-event02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-event03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-event04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-event05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-event06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-issue226-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-let/ts-let01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-newline-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-not-reactive01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-promise01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-promise02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-reactive01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-reactive02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-reactive03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-reactive04-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-reactive05-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-reactive06-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-scope-issue01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-shorthand-attr01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-store01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-store02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-store03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json b/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json deleted file mode 100644 index 9e82fc50..00000000 --- a/tests/fixtures/parser/ast/ts-use01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/src/parser/test-utils.ts b/tests/src/parser/test-utils.ts index 89425f23..1ef0a910 100644 --- a/tests/src/parser/test-utils.ts +++ b/tests/src/parser/test-utils.ts @@ -22,50 +22,50 @@ const BASIC_PARSER_OPTIONS: Linter.ParserOptions = { extraFileExtensions: [".svelte"], }; -const SVELTE5_SCOPE_VARIABLES_BASE = [ +const SVELTE5_SCOPE_VARIABLES_BASE = [ { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] + name: "$$slots", + identifiers: [], + defs: [], + references: [], }, { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] + name: "$$props", + identifiers: [], + defs: [], + references: [], }, { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] + name: "$$restProps", + identifiers: [], + defs: [], + references: [], }, { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] + name: "$state", + identifiers: [], + defs: [], + references: [], }, { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] + name: "$derived", + identifiers: [], + defs: [], + references: [], }, { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] + name: "$effect", + identifiers: [], + defs: [], + references: [], }, { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } -] + name: "$props", + identifiers: [], + defs: [], + references: [], + }, +]; export function generateParserOptions( ...options: Linter.ParserOptions[] @@ -110,7 +110,7 @@ function getScopeFile(inputFileName: string, isSvelte5Only: boolean) { "scope-output-svelte5.json", ); if (!fs.existsSync(scopeFileNameSvelte5)) { - scopeFileJson["variables"] = SVELTE5_SCOPE_VARIABLES_BASE; + scopeFileJson.variables = SVELTE5_SCOPE_VARIABLES_BASE; return JSON.stringify(scopeFileJson, null, 2); } From ef863fca93d8b9d0603081e433764d56e3abd790 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Thu, 16 Nov 2023 00:25:46 +0900 Subject: [PATCH 23/27] more --- .../parser/ast/$var-scope-output-svelte5.json | 46 ------------------- .../01-scope-output-svelte5.json | 46 ------------------- .../02-scope-output-svelte5.json | 46 ------------------- .../03-scope-output-svelte5.json | 46 ------------------- .../01-scope-output-svelte5.json | 46 ------------------- 5 files changed, 230 deletions(-) delete mode 100644 tests/fixtures/parser/ast/$var-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json diff --git a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json b/tests/fixtures/parser/ast/$var-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/$var-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/02-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/03-$-marks-a-statement-as-reactive/03-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json deleted file mode 100644 index 4c810448..00000000 --- a/tests/fixtures/parser/ast/docs/component-format/01-script/04-prefix-stores-with-$-to-access-their-values/01-scope-output-svelte5.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$state", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$derived", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$effect", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$props", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} From 658dee1cd904c6c722213281561185f2f121a4e5 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Thu, 16 Nov 2023 00:29:04 +0900 Subject: [PATCH 24/27] more --- .../ast/await03-scope-output-svelte5.json | 22 ------------------- .../01-scope-output-svelte5.json | 22 ------------------- .../02-old-scope-output-svelte5.json | 22 ------------------- .../ast/if-block01-scope-output-svelte5.json | 22 ------------------- ....41-empty-bind01-scope-output-svelte5.json | 22 ------------------- 5 files changed, 110 deletions(-) delete mode 100644 tests/fixtures/parser/ast/await03-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json delete mode 100644 tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json diff --git a/tests/fixtures/parser/ast/await03-scope-output-svelte5.json b/tests/fixtures/parser/ast/await03-scope-output-svelte5.json deleted file mode 100644 index b8e63d13..00000000 --- a/tests/fixtures/parser/ast/await03-scope-output-svelte5.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json deleted file mode 100644 index b8e63d13..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/01-scope-output-svelte5.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json b/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json deleted file mode 100644 index b8e63d13..00000000 --- a/tests/fixtures/parser/ast/docs/template-syntax/19-svelte-options/02-old-scope-output-svelte5.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json b/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json deleted file mode 100644 index b8e63d13..00000000 --- a/tests/fixtures/parser/ast/if-block01-scope-output-svelte5.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} diff --git a/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json b/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json deleted file mode 100644 index b8e63d13..00000000 --- a/tests/fixtures/parser/ast/illegal/parse-error-in-svelte-3.41-empty-bind01-scope-output-svelte5.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "variables": [ - { - "name": "$$slots", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$props", - "identifiers": [], - "defs": [], - "references": [] - }, - { - "name": "$$restProps", - "identifiers": [], - "defs": [], - "references": [] - } - ] -} From f18d1553750303f486775dcb21e38486ca138e25 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Thu, 16 Nov 2023 23:58:20 +0900 Subject: [PATCH 25/27] add more rune ts tests --- .../ast/svelte5/ts-$derived01-input.svelte | 10 + .../ast/svelte5/ts-$derived01-output.json | 2313 +++++++++++ .../svelte5/ts-$derived01-requirements.json | 5 + .../svelte5/ts-$derived01-scope-output.json | 1127 ++++++ .../svelte5/ts-$derived01-type-output.svelte | 10 + .../ast/svelte5/ts-$effect01-input.svelte | 24 + .../ast/svelte5/ts-$effect01-output.json | 3524 +++++++++++++++++ .../ts-$effect01-prefer-const-result.json | 8 + .../svelte5/ts-$effect01-requirements.json | 5 + .../svelte5/ts-$effect01-scope-output.json | 1664 ++++++++ .../svelte5/ts-$effect01-type-output.svelte | 28 + .../ast/svelte5/ts-$effectpre01-input.svelte | 24 + .../ast/svelte5/ts-$effectpre01-output.json | 3524 +++++++++++++++++ .../svelte5/ts-$effectpre01-requirements.json | 5 + .../svelte5/ts-$effectpre01-scope-output.json | 1664 ++++++++ .../ts-$effectpre01-type-output.svelte | 28 + .../ast/svelte5/ts-$props01-input.svelte | 14 + .../ast/svelte5/ts-$props01-output.json | 2264 +++++++++++ .../ts-$props01-prefer-const-result.json | 26 + .../ast/svelte5/ts-$props01-requirements.json | 5 + .../ast/svelte5/ts-$props01-scope-output.json | 2762 +++++++++++++ .../svelte5/ts-$props01-type-output.svelte | 19 + tests/src/parser/eslint-rules.ts | 5 +- 23 files changed, 19057 insertions(+), 1 deletion(-) create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$derived01-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$derived01-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$derived01-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$derived01-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$derived01-type-output.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effect01-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effect01-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effect01-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effect01-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effect01-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effect01-type-output.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effectpre01-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effectpre01-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effectpre01-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effectpre01-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$effectpre01-type-output.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$props01-input.svelte create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$props01-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$props01-prefer-const-result.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$props01-scope-output.json create mode 100644 tests/fixtures/parser/ast/svelte5/ts-$props01-type-output.svelte diff --git a/tests/fixtures/parser/ast/svelte5/ts-$derived01-input.svelte b/tests/fixtures/parser/ast/svelte5/ts-$derived01-input.svelte new file mode 100644 index 00000000..786144ab --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$derived01-input.svelte @@ -0,0 +1,10 @@ + + + + +

{count} doubled is {doubled}

diff --git a/tests/fixtures/parser/ast/svelte5/ts-$derived01-output.json b/tests/fixtures/parser/ast/svelte5/ts-$derived01-output.json new file mode 100644 index 00000000..3ae6df96 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$derived01-output.json @@ -0,0 +1,2313 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 21, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "range": [ + 71, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 62, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + "range": [ + 52, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + } + } + ], + "range": [ + 46, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 38 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 83, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + "range": [ + 0, + 92 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 102, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 119, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 119, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 113, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + "range": [ + 102, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 94, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "doubled", + "range": [ + 133, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "range": [ + 132, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 8, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 142, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 94, + 151 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 151, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 153, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "range": [ + 156, + 163 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": " doubled is ", + "range": [ + 163, + 175 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "doubled", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "range": [ + 175, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 31 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 184, + 188 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 35 + } + } + }, + "range": [ + 153, + 188 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 35 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Keyword", + "value": "const", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "*", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Numeric", + "value": "2", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 37 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 83, + 84 + ], + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 84, + 85 + ], + "loc": { + "start": { + "line": 4, + "column": 1 + }, + "end": { + "line": 4, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 85, + 91 + ], + "loc": { + "start": { + "line": 4, + "column": 2 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 92, + 94 + ], + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 6, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 95, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 102, + 104 + ], + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 6, + "column": 10 + }, + "end": { + "line": 6, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 105, + 110 + ], + "loc": { + "start": { + "line": 6, + "column": 11 + }, + "end": { + "line": 6, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 110, + 111 + ], + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 111, + 112 + ], + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 113, + 114 + ], + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 116, + 118 + ], + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 119, + 120 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "o", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "u", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "n", + "range": [ + 122, + 123 + ], + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "t", + "range": [ + 123, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 124, + 125 + ], + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 125, + 126 + ], + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 126, + 127 + ], + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 127, + 128 + ], + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 128, + 129 + ], + "loc": { + "start": { + "line": 6, + "column": 34 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "\n ", + "range": [ + 129, + 132 + ], + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 7, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 132, + 133 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 133, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 140, + 141 + ], + "loc": { + "start": { + "line": 7, + "column": 10 + }, + "end": { + "line": 7, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 7, + "column": 11 + }, + "end": { + "line": 8, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 142, + 143 + ], + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 144, + 150 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 150, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 151, + 153 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 10, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 153, + 154 + ], + "loc": { + "start": { + "line": 10, + "column": 0 + }, + "end": { + "line": 10, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 154, + 155 + ], + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 155, + 156 + ], + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 156, + 157 + ], + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 10, + "column": 9 + }, + "end": { + "line": 10, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 163, + 164 + ], + "loc": { + "start": { + "line": 10, + "column": 10 + }, + "end": { + "line": 10, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 164, + 171 + ], + "loc": { + "start": { + "line": 10, + "column": 11 + }, + "end": { + "line": 10, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 171, + 172 + ], + "loc": { + "start": { + "line": 10, + "column": 18 + }, + "end": { + "line": 10, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 172, + 174 + ], + "loc": { + "start": { + "line": 10, + "column": 19 + }, + "end": { + "line": 10, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 174, + 175 + ], + "loc": { + "start": { + "line": 10, + "column": 21 + }, + "end": { + "line": 10, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 10, + "column": 22 + }, + "end": { + "line": 10, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 183, + 184 + ], + "loc": { + "start": { + "line": 10, + "column": 30 + }, + "end": { + "line": 10, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 10, + "column": 31 + }, + "end": { + "line": 10, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 10, + "column": 32 + }, + "end": { + "line": 10, + "column": 33 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 10, + "column": 33 + }, + "end": { + "line": 10, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 10, + "column": 34 + }, + "end": { + "line": 10, + "column": 35 + } + } + } + ], + "range": [ + 0, + 189 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$derived01-requirements.json b/tests/fixtures/parser/ast/svelte5/ts-$derived01-requirements.json new file mode 100644 index 00000000..b0d8202a --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$derived01-requirements.json @@ -0,0 +1,5 @@ +{ + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$derived01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$derived01-scope-output.json new file mode 100644 index 00000000..c4c8d3d9 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$derived01-scope-output.json @@ -0,0 +1,1127 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 119, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "doubled", + "identifiers": [ + { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "range": [ + 71, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 62, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + "range": [ + 52, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 133, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 133, + 140 + ], + "loc": { + "start": { + "line": 7, + "column": 3 + }, + "end": { + "line": 7, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 157, + 162 + ], + "loc": { + "start": { + "line": 10, + "column": 4 + }, + "end": { + "line": 10, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 176, + 183 + ], + "loc": { + "start": { + "line": 10, + "column": 23 + }, + "end": { + "line": 10, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 119, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 119, + 124 + ], + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$derived01-type-output.svelte b/tests/fixtures/parser/ast/svelte5/ts-$derived01-type-output.svelte new file mode 100644 index 00000000..ec46cebf --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$derived01-type-output.svelte @@ -0,0 +1,10 @@ + + + + +

{count} doubled is {doubled}

diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effect01-input.svelte b/tests/fixtures/parser/ast/svelte5/ts-$effect01-input.svelte new file mode 100644 index 00000000..f236f469 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effect01-input.svelte @@ -0,0 +1,24 @@ + + + + +

{count} doubled is {doubled}

diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effect01-output.json b/tests/fixtures/parser/ast/svelte5/ts-$effect01-output.json new file mode 100644 index 00000000..1dc5c511 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effect01-output.json @@ -0,0 +1,3524 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 21, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 60, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "range": [ + 50, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + ], + "range": [ + 46, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "count", + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "doubled", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "doubled", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + } + ], + "range": [ + 252, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 240, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 248, + 251 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "range": [ + 240, + 251 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 240, + 271 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "range": [ + 240, + 272 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "\"cleanup\"", + "value": "cleanup", + "range": [ + 453, + 462 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 449, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "range": [ + 441, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "optional": false, + "range": [ + 441, + 463 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "range": [ + 441, + 464 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 29 + } + } + } + ], + "range": [ + 291, + 470 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 285, + 470 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "range": [ + 278, + 471 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 16, + "column": 6 + } + } + } + ], + "range": [ + 98, + 475 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 92, + 475 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 17, + "column": 3 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$effect", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "optional": false, + "range": [ + 84, + 476 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + "range": [ + 84, + 477 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 478, + 487 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "range": [ + 0, + 487 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 487, + 489 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 490, + 496 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 500, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 497, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 514, + 519 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 514, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 508, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 497, + 523 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 489, + 524 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 524, + 527 + ], + "loc": { + "start": { + "line": 20, + "column": 35 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "doubled", + "range": [ + 528, + 535 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + "range": [ + 527, + 536 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 536, + 537 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 22, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 537, + 546 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + "range": [ + 489, + 546 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 546, + 548 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 549, + 550 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 548, + 551 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 552, + 557 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "range": [ + 551, + 558 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": " doubled is ", + "range": [ + 558, + 570 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "doubled", + "range": [ + 571, + 578 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + "range": [ + 570, + 579 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 31 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 579, + 583 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 35 + } + } + }, + "range": [ + 548, + 583 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 35 + } + } + } + ], + "sourceType": "module", + "comments": [ + { + "type": "Line", + "value": " runs when the component is mounted, and again", + "range": [ + 104, + 152 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 52 + } + } + }, + { + "type": "Line", + "value": " whenever `count` or `doubled` change,", + "range": [ + 157, + 197 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + { + "type": "Line", + "value": " after the DOM has been updated", + "range": [ + 202, + 235 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 37 + } + } + }, + { + "type": "Line", + "value": " if a callback is provided, it will run", + "range": [ + 299, + 340 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + { + "type": "Line", + "value": " a) immediately before the effect re-runs", + "range": [ + 347, + 390 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Line", + "value": " b) when the component is destroyed", + "range": [ + 397, + 434 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 43 + } + } + } + ], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 46, + 49 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 58, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 68, + 69 + ], + "loc": { + "start": { + "line": 3, + "column": 24 + }, + "end": { + "line": 3, + "column": 25 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "*", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 31 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Numeric", + "value": "2", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 78, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 34 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 95, + 97 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 98, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 240, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 247, + 248 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 248, + 251 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 251, + 252 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 252, + 253 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 259, + 260 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 269, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 33 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 270, + 271 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 278, + 284 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 285, + 286 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 286, + 287 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 288, + 290 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 291, + 292 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 448, + 449 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 449, + 452 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 452, + 453 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 18 + } + } + }, + { + "type": "String", + "value": "\"cleanup\"", + "range": [ + 453, + 462 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 462, + 463 + ], + "loc": { + "start": { + "line": 15, + "column": 27 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 463, + 464 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, + "end": { + "line": 15, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 469, + 470 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 470, + 471 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 474, + 475 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 475, + 476 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 478, + 479 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 479, + 480 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 480, + 486 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 486, + 487 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 487, + 489 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 489, + 490 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 490, + 496 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 497, + 499 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 499, + 500 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 500, + 505 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 505, + 506 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 506, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 507, + 508 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 508, + 509 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 509, + 510 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 511, + 513 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 514, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "o", + "range": [ + 515, + 516 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "u", + "range": [ + 516, + 517 + ], + "loc": { + "start": { + "line": 20, + "column": 27 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "n", + "range": [ + 517, + 518 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "t", + "range": [ + 518, + 519 + ], + "loc": { + "start": { + "line": 20, + "column": 29 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 519, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 520, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 521, + 522 + ], + "loc": { + "start": { + "line": 20, + "column": 32 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 522, + 523 + ], + "loc": { + "start": { + "line": 20, + "column": 33 + }, + "end": { + "line": 20, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 523, + 524 + ], + "loc": { + "start": { + "line": 20, + "column": 34 + }, + "end": { + "line": 20, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "\n ", + "range": [ + 524, + 527 + ], + "loc": { + "start": { + "line": 20, + "column": 35 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 527, + 528 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 528, + 535 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 535, + 536 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 536, + 537 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 22, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 537, + 538 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 538, + 539 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 539, + 545 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 545, + 546 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 546, + 548 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 548, + 549 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 549, + 550 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 550, + 551 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 551, + 552 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 552, + 557 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 557, + 558 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 558, + 559 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 559, + 566 + ], + "loc": { + "start": { + "line": 24, + "column": 11 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 566, + 567 + ], + "loc": { + "start": { + "line": 24, + "column": 18 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 567, + 569 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 569, + 570 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 570, + 571 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 571, + 578 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 578, + 579 + ], + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 579, + 580 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 24, + "column": 32 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 581, + 582 + ], + "loc": { + "start": { + "line": 24, + "column": 33 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 582, + 583 + ], + "loc": { + "start": { + "line": 24, + "column": 34 + }, + "end": { + "line": 24, + "column": 35 + } + } + } + ], + "range": [ + 0, + 584 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effect01-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/ts-$effect01-prefer-const-result.json new file mode 100644 index 00000000..8739e810 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effect01-prefer-const-result.json @@ -0,0 +1,8 @@ +[ + { + "ruleId": "prefer-const", + "code": "doubled", + "line": 3, + "column": 7 + } +] diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effect01-requirements.json b/tests/fixtures/parser/ast/svelte5/ts-$effect01-requirements.json new file mode 100644 index 00000000..5e330e69 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effect01-requirements.json @@ -0,0 +1,5 @@ +{ + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effect01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$effect01-scope-output.json new file mode 100644 index 00000000..179d5270 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effect01-scope-output.json @@ -0,0 +1,1664 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 514, + 519 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 552, + 557 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "doubled", + "identifiers": [ + { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + "range": [ + 69, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 34 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "optional": false, + "range": [ + 60, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 35 + } + } + }, + "range": [ + 50, + 79 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 35 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 528, + 535 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 571, + 578 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 69, + 74 + ], + "loc": { + "start": { + "line": 3, + "column": 25 + }, + "end": { + "line": 3, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 528, + 535 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 552, + 557 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 571, + 578 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 240, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 240, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 254, + 259 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 261, + 268 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 50, + 57 + ], + "loc": { + "start": { + "line": 3, + "column": 6 + }, + "end": { + "line": 3, + "column": 13 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 514, + 519 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 514, + 519 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 60, + 68 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 24 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 84, + 91 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 240, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 240, + 247 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 441, + 448 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effect01-type-output.svelte b/tests/fixtures/parser/ast/svelte5/ts-$effect01-type-output.svelte new file mode 100644 index 00000000..88e645ef --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effect01-type-output.svelte @@ -0,0 +1,28 @@ + + + + +

{count} doubled is {doubled}

+ diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-input.svelte b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-input.svelte new file mode 100644 index 00000000..f7a3e092 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-input.svelte @@ -0,0 +1,24 @@ + + + + +

{count} doubled is {doubled}

diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-output.json b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-output.json new file mode 100644 index 00000000..10db2b28 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-output.json @@ -0,0 +1,3524 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "body": [ + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + ], + "range": [ + 21, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "const", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "range": [ + 71, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 62, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + "range": [ + 52, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + } + } + ], + "range": [ + 46, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "ObjectExpression", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "count", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "count", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "doubled", + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "doubled", + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + } + ], + "range": [ + 254, + 272 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 34 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 250, + 253 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "range": [ + 242, + 253 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + "optional": false, + "range": [ + 242, + 273 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + "range": [ + 242, + 274 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + { + "type": "ReturnStatement", + "argument": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "BlockStatement", + "body": [ + { + "type": "ExpressionStatement", + "expression": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "\"cleanup\"", + "value": "cleanup", + "range": [ + 455, + 464 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + } + ], + "callee": { + "type": "MemberExpression", + "computed": false, + "object": { + "type": "Identifier", + "name": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "optional": false, + "property": { + "type": "Identifier", + "name": "log", + "range": [ + 451, + 454 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "range": [ + 443, + 454 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + "optional": false, + "range": [ + 443, + 465 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + "range": [ + 443, + 466 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 29 + } + } + } + ], + "range": [ + 293, + 472 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 287, + 472 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + "range": [ + 280, + 473 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 16, + "column": 6 + } + } + } + ], + "range": [ + 100, + 477 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + "expression": false, + "generator": false, + "id": null, + "params": [], + "range": [ + 94, + 477 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 17, + "column": 3 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$effect", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "optional": false, + "range": [ + 86, + 478 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + "range": [ + 86, + 479 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 17, + "column": 5 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 480, + 489 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + "range": [ + 0, + 489 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 489, + 491 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "button", + "range": [ + 492, + 498 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteDirective", + "kind": "EventHandler", + "key": { + "type": "SvelteDirectiveKey", + "name": { + "type": "SvelteName", + "name": "click", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "modifiers": [], + "range": [ + 499, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "async": false, + "body": { + "type": "UpdateExpression", + "argument": { + "type": "Identifier", + "name": "count", + "range": [ + 516, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "operator": "++", + "prefix": false, + "range": [ + 516, + 523 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "expression": true, + "generator": false, + "id": null, + "params": [], + "range": [ + 510, + 523 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + "range": [ + 499, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 34 + } + } + } + ], + "selfClosing": false, + "range": [ + 491, + 526 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 35 + } + } + }, + "children": [ + { + "type": "SvelteText", + "value": "\n ", + "range": [ + 526, + 529 + ], + "loc": { + "start": { + "line": 20, + "column": 35 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "doubled", + "range": [ + 530, + 537 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + "range": [ + 529, + 538 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 538, + 539 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 22, + "column": 0 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 539, + 548 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + "range": [ + 491, + 548 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 548, + 550 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "SvelteElement", + "kind": "html", + "name": { + "type": "SvelteName", + "name": "p", + "range": [ + 551, + 552 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [], + "selfClosing": false, + "range": [ + 550, + 553 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + "children": [ + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "count", + "range": [ + 554, + 559 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "range": [ + 553, + 560 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "SvelteText", + "value": " doubled is ", + "range": [ + 560, + 572 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "doubled", + "range": [ + 573, + 580 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + "range": [ + 572, + 581 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 31 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 581, + 585 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 35 + } + } + }, + "range": [ + 550, + 585 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 35 + } + } + } + ], + "sourceType": "module", + "comments": [ + { + "type": "Line", + "value": " runs when the component is mounted, and again", + "range": [ + 106, + 154 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 52 + } + } + }, + { + "type": "Line", + "value": " whenever `count` or `doubled` change,", + "range": [ + 159, + 199 + ], + "loc": { + "start": { + "line": 7, + "column": 4 + }, + "end": { + "line": 7, + "column": 44 + } + } + }, + { + "type": "Line", + "value": " after the DOM has been updated", + "range": [ + 204, + 237 + ], + "loc": { + "start": { + "line": 8, + "column": 4 + }, + "end": { + "line": 8, + "column": 37 + } + } + }, + { + "type": "Line", + "value": " if a callback is provided, it will run", + "range": [ + 301, + 342 + ], + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 47 + } + } + }, + { + "type": "Line", + "value": " a) immediately before the effect re-runs", + "range": [ + 349, + 392 + ], + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 49 + } + } + }, + { + "type": "Line", + "value": " b) when the component is destroyed", + "range": [ + 399, + 436 + ], + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 43 + } + } + } + ], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 21, + 24 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 5 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 31, + 32 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Numeric", + "value": "0", + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 41, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 22 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 42, + 43 + ], + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": "Keyword", + "value": "const", + "range": [ + 46, + 51 + ], + "loc": { + "start": { + "line": 3, + "column": 2 + }, + "end": { + "line": 3, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 70, + 71 + ], + "loc": { + "start": { + "line": 3, + "column": 26 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "*", + "range": [ + 77, + 78 + ], + "loc": { + "start": { + "line": 3, + "column": 33 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": "Numeric", + "value": "2", + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 80, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 36 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 81, + 82 + ], + "loc": { + "start": { + "line": 3, + "column": 37 + }, + "end": { + "line": 3, + "column": 38 + } + } + }, + { + "type": "Identifier", + "value": "$effect", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 93, + 94 + ], + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 94, + 95 + ], + "loc": { + "start": { + "line": 5, + "column": 10 + }, + "end": { + "line": 5, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 95, + 96 + ], + "loc": { + "start": { + "line": 5, + "column": 11 + }, + "end": { + "line": 5, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 97, + 99 + ], + "loc": { + "start": { + "line": 5, + "column": 13 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 249, + 250 + ], + "loc": { + "start": { + "line": 9, + "column": 11 + }, + "end": { + "line": 9, + "column": 12 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 250, + 253 + ], + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 253, + 254 + ], + "loc": { + "start": { + "line": 9, + "column": 15 + }, + "end": { + "line": 9, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 254, + 255 + ], + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 261, + 262 + ], + "loc": { + "start": { + "line": 9, + "column": 23 + }, + "end": { + "line": 9, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 271, + 272 + ], + "loc": { + "start": { + "line": 9, + "column": 33 + }, + "end": { + "line": 9, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 272, + 273 + ], + "loc": { + "start": { + "line": 9, + "column": 34 + }, + "end": { + "line": 9, + "column": 35 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 273, + 274 + ], + "loc": { + "start": { + "line": 9, + "column": 35 + }, + "end": { + "line": 9, + "column": 36 + } + } + }, + { + "type": "Keyword", + "value": "return", + "range": [ + 280, + 286 + ], + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 287, + 288 + ], + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 288, + 289 + ], + "loc": { + "start": { + "line": 11, + "column": 12 + }, + "end": { + "line": 11, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 290, + 292 + ], + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 293, + 294 + ], + "loc": { + "start": { + "line": 11, + "column": 17 + }, + "end": { + "line": 11, + "column": 18 + } + } + }, + { + "type": "Identifier", + "value": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ".", + "range": [ + 450, + 451 + ], + "loc": { + "start": { + "line": 15, + "column": 13 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "log", + "range": [ + 451, + 454 + ], + "loc": { + "start": { + "line": 15, + "column": 14 + }, + "end": { + "line": 15, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 454, + 455 + ], + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 18 + } + } + }, + { + "type": "String", + "value": "\"cleanup\"", + "range": [ + 455, + 464 + ], + "loc": { + "start": { + "line": 15, + "column": 18 + }, + "end": { + "line": 15, + "column": 27 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 464, + 465 + ], + "loc": { + "start": { + "line": 15, + "column": 27 + }, + "end": { + "line": 15, + "column": 28 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 465, + 466 + ], + "loc": { + "start": { + "line": 15, + "column": 28 + }, + "end": { + "line": 15, + "column": 29 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 471, + 472 + ], + "loc": { + "start": { + "line": 16, + "column": 4 + }, + "end": { + "line": 16, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 472, + 473 + ], + "loc": { + "start": { + "line": 16, + "column": 5 + }, + "end": { + "line": 16, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 476, + 477 + ], + "loc": { + "start": { + "line": 17, + "column": 2 + }, + "end": { + "line": 17, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 477, + 478 + ], + "loc": { + "start": { + "line": 17, + "column": 3 + }, + "end": { + "line": 17, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 478, + 479 + ], + "loc": { + "start": { + "line": 17, + "column": 4 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 480, + 481 + ], + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 481, + 482 + ], + "loc": { + "start": { + "line": 18, + "column": 1 + }, + "end": { + "line": 18, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 482, + 488 + ], + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 488, + 489 + ], + "loc": { + "start": { + "line": 18, + "column": 8 + }, + "end": { + "line": 18, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 489, + 491 + ], + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 20, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 491, + 492 + ], + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 492, + 498 + ], + "loc": { + "start": { + "line": 20, + "column": 1 + }, + "end": { + "line": 20, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "on", + "range": [ + 499, + 501 + ], + "loc": { + "start": { + "line": 20, + "column": 8 + }, + "end": { + "line": 20, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 501, + 502 + ], + "loc": { + "start": { + "line": 20, + "column": 10 + }, + "end": { + "line": 20, + "column": 11 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "click", + "range": [ + 502, + 507 + ], + "loc": { + "start": { + "line": 20, + "column": 11 + }, + "end": { + "line": 20, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 507, + 508 + ], + "loc": { + "start": { + "line": 20, + "column": 16 + }, + "end": { + "line": 20, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 508, + 509 + ], + "loc": { + "start": { + "line": 20, + "column": 17 + }, + "end": { + "line": 20, + "column": 18 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 509, + 510 + ], + "loc": { + "start": { + "line": 20, + "column": 18 + }, + "end": { + "line": 20, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 510, + 511 + ], + "loc": { + "start": { + "line": 20, + "column": 19 + }, + "end": { + "line": 20, + "column": 20 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 511, + 512 + ], + "loc": { + "start": { + "line": 20, + "column": 20 + }, + "end": { + "line": 20, + "column": 21 + } + } + }, + { + "type": "Punctuator", + "value": "=>", + "range": [ + 513, + 515 + ], + "loc": { + "start": { + "line": 20, + "column": 22 + }, + "end": { + "line": 20, + "column": 24 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 516, + 517 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 26 + } + } + }, + { + "type": "Identifier", + "value": "o", + "range": [ + 517, + 518 + ], + "loc": { + "start": { + "line": 20, + "column": 26 + }, + "end": { + "line": 20, + "column": 27 + } + } + }, + { + "type": "Identifier", + "value": "u", + "range": [ + 518, + 519 + ], + "loc": { + "start": { + "line": 20, + "column": 27 + }, + "end": { + "line": 20, + "column": 28 + } + } + }, + { + "type": "Identifier", + "value": "n", + "range": [ + 519, + 520 + ], + "loc": { + "start": { + "line": 20, + "column": 28 + }, + "end": { + "line": 20, + "column": 29 + } + } + }, + { + "type": "Identifier", + "value": "t", + "range": [ + 520, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 29 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 521, + 522 + ], + "loc": { + "start": { + "line": 20, + "column": 30 + }, + "end": { + "line": 20, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "+", + "range": [ + 522, + 523 + ], + "loc": { + "start": { + "line": 20, + "column": 31 + }, + "end": { + "line": 20, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 523, + 524 + ], + "loc": { + "start": { + "line": 20, + "column": 32 + }, + "end": { + "line": 20, + "column": 33 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 524, + 525 + ], + "loc": { + "start": { + "line": 20, + "column": 33 + }, + "end": { + "line": 20, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 525, + 526 + ], + "loc": { + "start": { + "line": 20, + "column": 34 + }, + "end": { + "line": 20, + "column": 35 + } + } + }, + { + "type": "HTMLText", + "value": "\n ", + "range": [ + 526, + 529 + ], + "loc": { + "start": { + "line": 20, + "column": 35 + }, + "end": { + "line": 21, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 529, + 530 + ], + "loc": { + "start": { + "line": 21, + "column": 2 + }, + "end": { + "line": 21, + "column": 3 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 530, + 537 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 537, + 538 + ], + "loc": { + "start": { + "line": 21, + "column": 10 + }, + "end": { + "line": 21, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 538, + 539 + ], + "loc": { + "start": { + "line": 21, + "column": 11 + }, + "end": { + "line": 22, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 539, + 540 + ], + "loc": { + "start": { + "line": 22, + "column": 0 + }, + "end": { + "line": 22, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 540, + 541 + ], + "loc": { + "start": { + "line": 22, + "column": 1 + }, + "end": { + "line": 22, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "button", + "range": [ + 541, + 547 + ], + "loc": { + "start": { + "line": 22, + "column": 2 + }, + "end": { + "line": 22, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 547, + 548 + ], + "loc": { + "start": { + "line": 22, + "column": 8 + }, + "end": { + "line": 22, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 548, + 550 + ], + "loc": { + "start": { + "line": 22, + "column": 9 + }, + "end": { + "line": 24, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 550, + 551 + ], + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 24, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 551, + 552 + ], + "loc": { + "start": { + "line": 24, + "column": 1 + }, + "end": { + "line": 24, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 552, + 553 + ], + "loc": { + "start": { + "line": 24, + "column": 2 + }, + "end": { + "line": 24, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 553, + 554 + ], + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + { + "type": "Identifier", + "value": "count", + "range": [ + 554, + 559 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 559, + 560 + ], + "loc": { + "start": { + "line": 24, + "column": 9 + }, + "end": { + "line": 24, + "column": 10 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 560, + 561 + ], + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + { + "type": "HTMLText", + "value": "doubled", + "range": [ + 561, + 568 + ], + "loc": { + "start": { + "line": 24, + "column": 11 + }, + "end": { + "line": 24, + "column": 18 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 568, + 569 + ], + "loc": { + "start": { + "line": 24, + "column": 18 + }, + "end": { + "line": 24, + "column": 19 + } + } + }, + { + "type": "HTMLText", + "value": "is", + "range": [ + 569, + 571 + ], + "loc": { + "start": { + "line": 24, + "column": 19 + }, + "end": { + "line": 24, + "column": 21 + } + } + }, + { + "type": "HTMLText", + "value": " ", + "range": [ + 571, + 572 + ], + "loc": { + "start": { + "line": 24, + "column": 21 + }, + "end": { + "line": 24, + "column": 22 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 572, + 573 + ], + "loc": { + "start": { + "line": 24, + "column": 22 + }, + "end": { + "line": 24, + "column": 23 + } + } + }, + { + "type": "Identifier", + "value": "doubled", + "range": [ + 573, + 580 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 580, + 581 + ], + "loc": { + "start": { + "line": 24, + "column": 30 + }, + "end": { + "line": 24, + "column": 31 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 581, + 582 + ], + "loc": { + "start": { + "line": 24, + "column": 31 + }, + "end": { + "line": 24, + "column": 32 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 582, + 583 + ], + "loc": { + "start": { + "line": 24, + "column": 32 + }, + "end": { + "line": 24, + "column": 33 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "p", + "range": [ + 583, + 584 + ], + "loc": { + "start": { + "line": 24, + "column": 33 + }, + "end": { + "line": 24, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 584, + 585 + ], + "loc": { + "start": { + "line": 24, + "column": 34 + }, + "end": { + "line": 24, + "column": 35 + } + } + } + ], + "range": [ + 0, + 586 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 25, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-requirements.json b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-requirements.json new file mode 100644 index 00000000..5e330e69 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-requirements.json @@ -0,0 +1,5 @@ +{ + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-scope-output.json new file mode 100644 index 00000000..cad52fc6 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-scope-output.json @@ -0,0 +1,1664 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "count", + "identifiers": [ + { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "Literal", + "raw": "0", + "value": 0, + "range": [ + 40, + 41 + ], + "loc": { + "start": { + "line": 2, + "column": 21 + }, + "end": { + "line": 2, + "column": 22 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "optional": false, + "range": [ + 33, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + "range": [ + 25, + 42 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 23 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 516, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 554, + 559 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + }, + { + "name": "doubled", + "identifiers": [ + { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [ + { + "type": "BinaryExpression", + "left": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "operator": "*", + "right": { + "type": "Literal", + "raw": "2", + "value": 2, + "range": [ + 79, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 36 + } + } + }, + "range": [ + 71, + 80 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 36 + } + } + } + ], + "callee": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "optional": false, + "range": [ + 62, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 37 + } + } + }, + "range": [ + 52, + 81 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 37 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 530, + 537 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 573, + 580 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 71, + 76 + ], + "loc": { + "start": { + "line": 3, + "column": 27 + }, + "end": { + "line": 3, + "column": 32 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 530, + 537 + ], + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 10 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 554, + 559 + ], + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 573, + 580 + ], + "loc": { + "start": { + "line": 24, + "column": 23 + }, + "end": { + "line": 24, + "column": 30 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + } + ], + "childScopes": [ + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 256, + 261 + ], + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "doubled", + "range": [ + 263, + 270 + ], + "loc": { + "start": { + "line": 9, + "column": 25 + }, + "end": { + "line": 9, + "column": 32 + } + } + }, + "from": "function", + "init": null, + "resolved": { + "type": "Identifier", + "name": "doubled", + "range": [ + 52, + 59 + ], + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + }, + { + "type": "function", + "variables": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 516, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "count", + "range": [ + 516, + 521 + ], + "loc": { + "start": { + "line": 20, + "column": 25 + }, + "end": { + "line": 20, + "column": 30 + } + } + }, + "from": "function", + "init": false, + "resolved": { + "type": "Identifier", + "name": "count", + "range": [ + 25, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 6 + }, + "end": { + "line": 2, + "column": 11 + } + } + } + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$state", + "range": [ + 33, + 39 + ], + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 20 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$derived", + "range": [ + 62, + 70 + ], + "loc": { + "start": { + "line": 3, + "column": 18 + }, + "end": { + "line": 3, + "column": 26 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "$effect", + "range": [ + 86, + 93 + ], + "loc": { + "start": { + "line": 5, + "column": 2 + }, + "end": { + "line": 5, + "column": 9 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] + } + ], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 242, + 249 + ], + "loc": { + "start": { + "line": 9, + "column": 4 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + "from": "function", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "console", + "range": [ + 443, + 450 + ], + "loc": { + "start": { + "line": 15, + "column": 6 + }, + "end": { + "line": 15, + "column": 13 + } + } + }, + "from": "function", + "init": null, + "resolved": null + } + ] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-type-output.svelte b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-type-output.svelte new file mode 100644 index 00000000..445adde7 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$effectpre01-type-output.svelte @@ -0,0 +1,28 @@ + + + + +

{count} doubled is {doubled}

+ diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-input.svelte b/tests/fixtures/parser/ast/svelte5/ts-$props01-input.svelte new file mode 100644 index 00000000..a1071d3e --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-input.svelte @@ -0,0 +1,14 @@ + + +{a} +{b} +{c} +{everythingElse} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-output.json b/tests/fixtures/parser/ast/svelte5/ts-$props01-output.json new file mode 100644 index 00000000..286c113b --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-output.json @@ -0,0 +1,2264 @@ +{ + "type": "Program", + "body": [ + { + "type": "SvelteScriptElement", + "name": { + "type": "SvelteName", + "name": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + "startTag": { + "type": "SvelteStartTag", + "attributes": [ + { + "type": "SvelteAttribute", + "key": { + "type": "SvelteName", + "name": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + "boolean": false, + "value": [ + { + "type": "SvelteLiteral", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + "range": [ + 8, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + "selfClosing": false, + "range": [ + 0, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "body": [ + { + "type": "TSInterfaceDeclaration", + "body": { + "type": "TSInterfaceBody", + "body": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 45, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 63, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 76, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 75, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "d", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [ + 92, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [ + 91, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [ + 39, + 105 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "extends": [], + "id": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 21, + 105 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "VariableDeclaration", + "kind": "let", + "declarations": [ + { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 123, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "range": [ + 112, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + } + ], + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + "range": [ + 145, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + "range": [ + 112, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 56 + } + } + } + ], + "range": [ + 108, + 163 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 57 + } + } + } + ], + "endTag": { + "type": "SvelteEndTag", + "range": [ + 164, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + "range": [ + 0, + 173 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "SvelteText", + "value": "\n\n", + "range": [ + 173, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 11, + "column": 0 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "a", + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "range": [ + 175, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "b", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "range": [ + 179, + 182 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 13, + "column": 0 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "c", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "range": [ + 183, + 186 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "SvelteText", + "value": "\n", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 14, + "column": 0 + } + } + }, + { + "type": "SvelteMustacheTag", + "kind": "text", + "expression": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 188, + 202 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "range": [ + 187, + 203 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 16 + } + } + } + ], + "sourceType": "module", + "comments": [], + "tokens": [ + { + "type": "Punctuator", + "value": "<", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 1, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "lang", + "range": [ + 8, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "HTMLText", + "value": "ts", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "\"", + "range": [ + 16, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": "Keyword", + "value": "interface", + "range": [ + 21, + 30 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 2, + "column": 11 + } + } + }, + { + "type": "Identifier", + "value": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 39, + 40 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 21 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 46, + 47 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "number", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 54, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 13 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 61, + 62 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "string", + "range": [ + 63, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 69, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 76, + 77 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "boolean", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 85, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "Identifier", + "value": "d", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": ":", + "range": [ + 92, + 93 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": "Identifier", + "value": "number", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 100, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 13 + }, + "end": { + "line": 6, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 104, + 105 + ], + "loc": { + "start": { + "line": 7, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "Keyword", + "value": "let", + "range": [ + 108, + 111 + ], + "loc": { + "start": { + "line": 8, + "column": 2 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 112, + 113 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 115, + 116 + ], + "loc": { + "start": { + "line": 8, + "column": 9 + }, + "end": { + "line": 8, + "column": 10 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 118, + 119 + ], + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 13 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": ",", + "range": [ + 121, + 122 + ], + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": "Punctuator", + "value": "...", + "range": [ + 123, + 126 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": "Identifier", + "value": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 141, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + { + "type": "Punctuator", + "value": "=", + "range": [ + 143, + 144 + ], + "loc": { + "start": { + "line": 8, + "column": 37 + }, + "end": { + "line": 8, + "column": 38 + } + } + }, + { + "type": "Identifier", + "value": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 151, + 152 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 46 + } + } + }, + { + "type": "Identifier", + "value": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 159, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 53 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 160, + 161 + ], + "loc": { + "start": { + "line": 8, + "column": 54 + }, + "end": { + "line": 8, + "column": 55 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 161, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 55 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + { + "type": "Punctuator", + "value": ";", + "range": [ + 162, + 163 + ], + "loc": { + "start": { + "line": 8, + "column": 56 + }, + "end": { + "line": 8, + "column": 57 + } + } + }, + { + "type": "Punctuator", + "value": "<", + "range": [ + 164, + 165 + ], + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 165, + 166 + ], + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 2 + } + } + }, + { + "type": "HTMLIdentifier", + "value": "script", + "range": [ + 166, + 172 + ], + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": ">", + "range": [ + 172, + 173 + ], + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": "HTMLText", + "value": "\n\n", + "range": [ + 173, + 175 + ], + "loc": { + "start": { + "line": 9, + "column": 9 + }, + "end": { + "line": 11, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 175, + 176 + ], + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "a", + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 177, + 178 + ], + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 178, + 179 + ], + "loc": { + "start": { + "line": 11, + "column": 3 + }, + "end": { + "line": 12, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 179, + 180 + ], + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 12, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "b", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 181, + 182 + ], + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 182, + 183 + ], + "loc": { + "start": { + "line": 12, + "column": 3 + }, + "end": { + "line": 13, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 183, + 184 + ], + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "c", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 185, + 186 + ], + "loc": { + "start": { + "line": 13, + "column": 2 + }, + "end": { + "line": 13, + "column": 3 + } + } + }, + { + "type": "HTMLText", + "value": "\n", + "range": [ + 186, + 187 + ], + "loc": { + "start": { + "line": 13, + "column": 3 + }, + "end": { + "line": 14, + "column": 0 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 187, + 188 + ], + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": "Identifier", + "value": "everythingElse", + "range": [ + 188, + 202 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 202, + 203 + ], + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 16 + } + } + } + ], + "range": [ + 0, + 204 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-prefer-const-result.json b/tests/fixtures/parser/ast/svelte5/ts-$props01-prefer-const-result.json new file mode 100644 index 00000000..edf06348 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-prefer-const-result.json @@ -0,0 +1,26 @@ +[ + { + "ruleId": "prefer-const", + "code": "a", + "line": 8, + "column": 9 + }, + { + "ruleId": "prefer-const", + "code": "b", + "line": 8, + "column": 12 + }, + { + "ruleId": "prefer-const", + "code": "c", + "line": 8, + "column": 15 + }, + { + "ruleId": "prefer-const", + "code": "everythingElse", + "line": 8, + "column": 21 + } +] diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json b/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json new file mode 100644 index 00000000..5e330e69 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json @@ -0,0 +1,5 @@ +{ + "scope": { + "@typescript-eslint/parser": ">=6.5.0" + } +} diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-scope-output.json b/tests/fixtures/parser/ast/svelte5/ts-$props01-scope-output.json new file mode 100644 index 00000000..c3abab56 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-scope-output.json @@ -0,0 +1,2762 @@ +{ + "type": "global", + "variables": [ + { + "name": "$$slots", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$props", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$$restProps", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$state", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$derived", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$effect", + "identifiers": [], + "defs": [], + "references": [] + }, + { + "name": "$props", + "identifiers": [], + "defs": [], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "references": [], + "childScopes": [ + { + "type": "module", + "variables": [ + { + "name": "MyProps", + "identifiers": [ + { + "type": "Identifier", + "name": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + ], + "defs": [ + { + "type": "Type", + "name": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "node": { + "type": "TSInterfaceDeclaration", + "body": { + "type": "TSInterfaceBody", + "body": [ + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 45, + 46 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 48, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 46, + 54 + ], + "loc": { + "start": { + "line": 3, + "column": 5 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + "range": [ + 45, + 55 + ], + "loc": { + "start": { + "line": 3, + "column": 4 + }, + "end": { + "line": 3, + "column": 14 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 60, + 61 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSStringKeyword", + "range": [ + 63, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 61, + 69 + ], + "loc": { + "start": { + "line": 4, + "column": 5 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + "range": [ + 60, + 70 + ], + "loc": { + "start": { + "line": 4, + "column": 4 + }, + "end": { + "line": 4, + "column": 14 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 75, + 76 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSBooleanKeyword", + "range": [ + 78, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 76, + 85 + ], + "loc": { + "start": { + "line": 5, + "column": 5 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + "range": [ + 75, + 86 + ], + "loc": { + "start": { + "line": 5, + "column": 4 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": "TSPropertySignature", + "computed": false, + "key": { + "type": "Identifier", + "name": "d", + "range": [ + 91, + 92 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 5 + } + } + }, + "typeAnnotation": { + "type": "TSTypeAnnotation", + "typeAnnotation": { + "type": "TSNumberKeyword", + "range": [ + 94, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [ + 92, + 100 + ], + "loc": { + "start": { + "line": 6, + "column": 5 + }, + "end": { + "line": 6, + "column": 13 + } + } + }, + "range": [ + 91, + 101 + ], + "loc": { + "start": { + "line": 6, + "column": 4 + }, + "end": { + "line": 6, + "column": 14 + } + } + } + ], + "range": [ + 39, + 105 + ], + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + "extends": [], + "id": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + "range": [ + 21, + 105 + ], + "loc": { + "start": { + "line": 2, + "column": 2 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + } + ] + }, + { + "name": "a", + "identifiers": [ + { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 123, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "range": [ + 112, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + } + ], + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + "range": [ + 145, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + "range": [ + 112, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 56 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + } + ] + }, + { + "name": "b", + "identifiers": [ + { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 123, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "range": [ + 112, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + } + ], + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + "range": [ + 145, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + "range": [ + 112, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 56 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + } + } + ] + }, + { + "name": "c", + "identifiers": [ + { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 123, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "range": [ + 112, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + } + ], + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + "range": [ + 145, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + "range": [ + 112, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 56 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + } + ] + }, + { + "name": "everythingElse", + "identifiers": [ + { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "defs": [ + { + "type": "Variable", + "name": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "node": { + "type": "VariableDeclarator", + "id": { + "type": "ObjectPattern", + "properties": [ + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + { + "type": "Property", + "kind": "init", + "computed": false, + "key": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "method": false, + "shorthand": true, + "value": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": "RestElement", + "argument": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "optional": false, + "range": [ + 123, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + ], + "range": [ + 112, + 142 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + "init": { + "type": "CallExpression", + "arguments": [], + "callee": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "optional": false, + "typeArguments": { + "type": "TSTypeParameterInstantiation", + "params": [ + { + "type": "TSTypeReference", + "typeName": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + } + ], + "range": [ + 151, + 160 + ], + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + "range": [ + 145, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 56 + } + } + }, + "range": [ + 112, + 162 + ], + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 56 + } + } + } + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 188, + 202 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + } + ] + } + ], + "references": [ + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + "from": "module", + "init": true, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + }, + { + "identifier": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 152, + 159 + ], + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 53 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "MyProps", + "range": [ + 31, + 38 + ], + "loc": { + "start": { + "line": 2, + "column": 12 + }, + "end": { + "line": 2, + "column": 19 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "a", + "range": [ + 176, + 177 + ], + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "a", + "range": [ + 114, + 115 + ], + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "b", + "range": [ + 180, + 181 + ], + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "b", + "range": [ + 117, + 118 + ], + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "c", + "range": [ + 184, + 185 + ], + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 13, + "column": 2 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "c", + "range": [ + 120, + 121 + ], + "loc": { + "start": { + "line": 8, + "column": 14 + }, + "end": { + "line": 8, + "column": 15 + } + } + } + }, + { + "identifier": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 188, + 202 + ], + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + "from": "module", + "init": null, + "resolved": { + "type": "Identifier", + "name": "everythingElse", + "range": [ + 126, + 140 + ], + "loc": { + "start": { + "line": 8, + "column": 20 + }, + "end": { + "line": 8, + "column": 34 + } + } + } + } + ], + "childScopes": [], + "through": [ + { + "identifier": { + "type": "Identifier", + "name": "$props", + "range": [ + 145, + 151 + ], + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + "from": "module", + "init": null, + "resolved": null + } + ] + } + ], + "through": [] +} \ No newline at end of file diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-type-output.svelte b/tests/fixtures/parser/ast/svelte5/ts-$props01-type-output.svelte new file mode 100644 index 00000000..39d5f8a3 --- /dev/null +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-type-output.svelte @@ -0,0 +1,19 @@ + + +{a} + +{b} + +{c} + +{everythingElse} + diff --git a/tests/src/parser/eslint-rules.ts b/tests/src/parser/eslint-rules.ts index 570a426c..967b8700 100644 --- a/tests/src/parser/eslint-rules.ts +++ b/tests/src/parser/eslint-rules.ts @@ -86,7 +86,10 @@ describe("svelte-eslint-parser with ESLint rules", () => { assert.strictEqual(messagesJson, "[]"); } else { const output = fs.readFileSync(outputFileName, "utf8"); - assert.strictEqual(messagesJson, output); + assert.strictEqual( + JSON.stringify(JSON.parse(messagesJson), null, 2), + JSON.stringify(JSON.parse(output), null, 2), + ); } } }); From 01dfa1749534e8687294edd545aad3a501eb3020 Mon Sep 17 00:00:00 2001 From: baseballyama Date: Fri, 17 Nov 2023 00:07:58 +0900 Subject: [PATCH 26/27] can i skip? --- .../fixtures/parser/ast/svelte5/ts-$props01-requirements.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json b/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json index 5e330e69..14189c9d 100644 --- a/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json +++ b/tests/fixtures/parser/ast/svelte5/ts-$props01-requirements.json @@ -1,4 +1,7 @@ { + "test": { + "@typescript-eslint/parser": ">=6.5.0" + }, "scope": { "@typescript-eslint/parser": ">=6.5.0" } From 0a61e915bfe1ebb9f63cc658e8fa0720cb482b3c Mon Sep 17 00:00:00 2001 From: baseballyama Date: Fri, 17 Nov 2023 10:55:36 +0900 Subject: [PATCH 27/27] dry out --- src/parser/typescript/analyze/index.ts | 73 ++++++++++---------------- 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/src/parser/typescript/analyze/index.ts b/src/parser/typescript/analyze/index.ts index 727726d1..4f9e4b1e 100644 --- a/src/parser/typescript/analyze/index.ts +++ b/src/parser/typescript/analyze/index.ts @@ -219,62 +219,45 @@ function analyzeDollarDollarVariables( function addSvelte5Globals() { for (const svelte5Global of globalsForSvelte5) { + if ( + !scopeManager.globalScope!.through.some( + (reference) => reference.identifier.name === svelte5Global, + ) + ) { + continue; + } switch (svelte5Global) { case "$state": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareFunctionVirtualScript( - svelte5Global, - "(initial: T): T", - ); - appendDeclareFunctionVirtualScript( - svelte5Global, - "(): T | undefined", - ); - } + appendDeclareFunctionVirtualScript( + svelte5Global, + "(initial: T): T", + ); + appendDeclareFunctionVirtualScript( + svelte5Global, + "(): T | undefined", + ); break; } case "$derived": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareFunctionVirtualScript( - svelte5Global, - "(expression: T): T", - ); - } + appendDeclareFunctionVirtualScript( + svelte5Global, + "(expression: T): T", + ); break; } case "$effect": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareFunctionVirtualScript( - svelte5Global, - "(fn: () => void | (() => void)): void", - ); - appendDeclareNamespaceVirtualScript( - svelte5Global, - "export function pre(fn: () => void | (() => void)): void;", - ); - } + appendDeclareFunctionVirtualScript( + svelte5Global, + "(fn: () => void | (() => void)): void", + ); + appendDeclareNamespaceVirtualScript( + svelte5Global, + "export function pre(fn: () => void | (() => void)): void;", + ); break; } case "$props": { - if ( - scopeManager.globalScope!.through.some( - (reference) => reference.identifier.name === svelte5Global, - ) - ) { - appendDeclareFunctionVirtualScript(svelte5Global, "(): T"); - } + appendDeclareFunctionVirtualScript(svelte5Global, "(): T"); break; } default: {